History

perf: Add a counter for number of user access events in context

On arm64, user space counter access will be controlled differently compared to x86. On x86, access in the strictest mode is enabled for all tasks in an MM when any event is mmap'ed. For arm64, access is explicitly requested for an event and only enabled when the event's context is active. This avoids hooks into the arch context switch code and gives better control of when access is enabled. In order to configure user space access when the PMU is enabled, it is necessary to know if any event (currently active or not) in the current context has user space accessed enabled. Add a counter similar to other counters in the context to avoid walking the event list every time.

Rob Herring committed 4 years ago

Commit 82ff0c01 parent 369461c2 files · +5 −0Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/linux/perf_event.h+1−0
@@ -831,6 +831,7 @@ struct perf_event_context { · 830 unmodified lines
831 831
832 int nr_events;832 int nr_events;
833 int nr_active;833 int nr_active;
834 int nr_user;
834 int is_active;835 int is_active;
835 int nr_stat;836 int nr_stat;
836 int nr_freq;837 int nr_freq;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t