Introduce the DTrace scripts used to measure the performance in

the project.
This commit is contained in:
Jesper Louis Andersen 2015-08-29 21:30:31 +02:00
parent 8c31db792b
commit f05ba6e207
3 changed files with 46 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,7 +3,6 @@
ebin
*.beam
*.o
*.d
*.eqc
*.so
eqc_test/.eqc-info

37
bench/enacl_nif.d Normal file
View File

@ -0,0 +1,37 @@
/* Dirty NIF schedule overhead */
pid$target:beam.smp:schedule_dirty_cpu_nif:return
{
s = timestamp;
}
pid$target:libsodium.so.*:randombytes:entry {
e = timestamp;
}
pid$target:beam.smp:execute_dirty_nif:entry
/s != 0/
{
@SchedTime = lquantize(timestamp - s, 0, 10000, 250);
s = 0;
}
pid$target:beam.smp:execute_dirty_nif:return
{
@ExecTime = lquantize(timestamp - e, 0, 10000, 250);
e = 0;
r = timestamp;
}
pid$target:beam.smp:dirty_nif_finalizer:entry
/r != 0/
{
@ReturnTime = lquantize(timestamp - r, 0, 10000, 250);
r = 0;
}
END
{
printa("Scheduling overhead (nanos):%@d\n", @SchedTime);
printa("Return overhead (nanos):%@d\n", @ReturnTime);
printa("Exec time (nanos):%@d\n", @ExecTime);
}

9
bench/funcall_enacl.d Normal file
View File

@ -0,0 +1,9 @@
erlang*:::nif-entry
{
funcall_entry_ts[cpu, copyinstr(arg1)] = vtimestamp;
}
erlang*:::nif-return
{
@time[cpu, copyinstr(arg1)] = lquantize((vtimestamp - funcall_entry_ts[cpu, copyinstr(arg1)] ), 0, 60000, 1000);
}