Introduce the DTrace scripts used to measure the performance in
the project.
This commit is contained in:
parent
8c31db792b
commit
f05ba6e207
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
ebin
|
ebin
|
||||||
*.beam
|
*.beam
|
||||||
*.o
|
*.o
|
||||||
*.d
|
|
||||||
*.eqc
|
*.eqc
|
||||||
*.so
|
*.so
|
||||||
eqc_test/.eqc-info
|
eqc_test/.eqc-info
|
||||||
|
37
bench/enacl_nif.d
Normal file
37
bench/enacl_nif.d
Normal 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
9
bench/funcall_enacl.d
Normal 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);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user