mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 22:50:54 +00:00
sources/perf: Capture DRM vblank events as a mark.
This should be useful to visualize system-wide events in the CPU timeline, especially once we add some more events. We may want to define some modes eventually, as not all captures will care about GPU visualization. However, it's pretty low overhead (60Hz * number of monitors), so maybe we can just filter it out at visualization time. We do a bit more setup work than necessary here (looking up the config number for the tracepoint per CPU, rather than looking it up once at startup), but I suspect I'll want to refactor the init anyway once we add more tracepoint markers.
This commit is contained in:
committed by
Christian Hergert
parent
925dadce82
commit
ac11f0f941
@ -115,7 +115,7 @@ _perf_event_open (struct perf_event_attr *attr,
|
||||
assert (attr != NULL);
|
||||
|
||||
/* Quick sanity check */
|
||||
if (attr->sample_period < 100000)
|
||||
if (attr->sample_period < 100000 && attr->type != PERF_TYPE_TRACEPOINT)
|
||||
return -EINVAL;
|
||||
|
||||
return syscall (__NR_perf_event_open, attr, pid, cpu, group_fd, flags);
|
||||
|
||||
Reference in New Issue
Block a user