G'Day perf users,

Is there a way to filter perf from tracing itself?

Here's an idle system:

# ./perf record -e syscalls:sys_enter_read -a sleep 5
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.569 MB perf.data (~24864 samples) ]
# ./perf record -e syscalls:sys_enter_write -a sleep 5
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 150.381 MB perf.data (~6570251 samples) ]

Note the disparity. perf is capturing its own writes, creating a feedback loop.

I haven't seen a way to filter this. Eg:

# ./perf record -q -e syscalls:sys_enter_write --filter 'comm != perf'
-a sleep 5
  Error: failed to set filter with 22 (Invalid argument)

# ./perf record -q -e syscalls:sys_enter_write --filter 'ppid != '$$ -a sleep 5
  Error: failed to set filter with 22 (Invalid argument)

# ./perf record -q -e raw_syscalls:sys_enter --filter 'comm != perf' -a sleep 5
  Error: failed to set filter with 22 (Invalid argument)

# ./perf record -q -e raw_syscalls:sys_enter --filter 'common_ppid !=
'$$ -a sleep 5
  Error: failed to set filter with 22 (Invalid argument)

This is because comm, ppid, common_ppid, etc, aren't available for
those tracepoints.

I thought there might be a simple way I'm missing. I'm on
linux-3.16-rc2. Thanks,

Brendan

-- 
http://www.brendangregg.com
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to