Skip to content

Commit

Permalink
bcc/python: add perf_custom_event_open
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocarrozzo authored and yonghong-song committed Dec 9, 2023
1 parent 6fd39b6 commit fc3d942
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/python/bcc/perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,9 @@ def perf_event_open(tpoint_id, pid=-1, ptype=PERF_TYPE_TRACEPOINT,

for cpu in get_online_cpus():
Perf._open_for_cpu(cpu, attr)

@staticmethod
def perf_custom_event_open(attr, pid=-1):
attr.pid = pid
for cpu in get_online_cpus():
Perf._open_for_cpu(cpu, attr)

0 comments on commit fc3d942

Please sign in to comment.