systemtap/tests/Regression/python-probing/top.stp
Martin Cermak 5d247c7220 CI Tests: make Regression/python-probing less flaky
Make Regression/python-probing less flaky by restricting
the output flow, preventing the transport buffers flood (PR29108).
2022-05-26 11:05:48 +02:00

20 lines
426 B
Plaintext
Executable File

#!/usr/bin/stap -v
global fn_calls;
probe python.function.entry
{
fn_calls[pid(), filename, funcname, lineno] += 1;
}
probe timer.ms(1000) {
foreach ([pid, filename, funcname, lineno] in fn_calls- limit 1000) {
if (filename =~ "random")
printf("%6d %80s %6d %30s %6d\n",
pid, filename, lineno, funcname,
fn_calls[pid, filename, funcname, lineno]);
}
delete fn_calls;
}