Permalink
Browse files

Added the SystemTap script.

  • Loading branch information...
1 parent ef17494 commit 7a2cbcdb40d84d2c193bf29fbf342a7f7b7dfcf7 @k4t3r1n4 k4t3r1n4 committed Oct 3, 2012
Showing with 25 additions and 0 deletions.
  1. +25 −0 lib/percept/priv/dtrace/dtrace-percept.stap
@@ -0,0 +1,25 @@
+probe process("beam.smp").begin
+{
+ us = gettimeofday_us();
+ s = us / 1000000;
+ us = us % 1000000;
+ ms = s / 1000000;
+ s = s % 1000000;
+ printf("{profile_start, {%d,%d,%d}}.\n", ms, s, us);
+}
+
+probe process("beam.smp").mark("percept__trace")
+{
+ println(user_string($arg1));
+}
+
+probe process("beam.smp").end
+{
+ us = gettimeofday_us();
+ s = us / 1000000;
+ us = us % 1000000;
+ ms = s / 1000000;
+ s = s % 1000000;
+ printf("{profile_stop, {%d,%d,%d}}.\n", ms, s, us);
+}
+

0 comments on commit 7a2cbcd

Please sign in to comment.