summaryrefslogtreecommitdiff
path: root/Lib/test/dtracedata/gc.stp
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/dtracedata/gc.stp')
-rw-r--r--Lib/test/dtracedata/gc.stp26
1 files changed, 26 insertions, 0 deletions
diff --git a/Lib/test/dtracedata/gc.stp b/Lib/test/dtracedata/gc.stp
new file mode 100644
index 0000000000..162c6d3a22
--- /dev/null
+++ b/Lib/test/dtracedata/gc.stp
@@ -0,0 +1,26 @@
+global tracing
+
+probe process.mark("function__entry")
+{
+ funcname = user_string($arg2);
+
+ if (funcname == "start") {
+ tracing = 1;
+ }
+}
+
+probe process.mark("gc__start"), process.mark("gc__done")
+{
+ if (tracing) {
+ printf("%d\t%s:%ld\n", gettimeofday_us(), $$name, $arg1);
+ }
+}
+
+probe process.mark("function__return")
+{
+ funcname = user_string($arg2);
+
+ if (funcname == "start") {
+ tracing = 0;
+ }
+}