diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/design.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/design.txt b/tools/perf/design.txt index 63a0e6f04a01..a28dca2582aa 100644 --- a/tools/perf/design.txt +++ b/tools/perf/design.txt | |||
@@ -18,7 +18,7 @@ underlying hardware counters. | |||
18 | Performance counters are accessed via special file descriptors. | 18 | Performance counters are accessed via special file descriptors. |
19 | There's one file descriptor per virtual counter used. | 19 | There's one file descriptor per virtual counter used. |
20 | 20 | ||
21 | The special file descriptor is opened via the perf_event_open() | 21 | The special file descriptor is opened via the sys_perf_event_open() |
22 | system call: | 22 | system call: |
23 | 23 | ||
24 | int sys_perf_event_open(struct perf_event_attr *hw_event_uptr, | 24 | int sys_perf_event_open(struct perf_event_attr *hw_event_uptr, |
@@ -82,7 +82,7 @@ machine-specific. | |||
82 | If 'raw_type' is 0, then the 'type' field says what kind of counter | 82 | If 'raw_type' is 0, then the 'type' field says what kind of counter |
83 | this is, with the following encoding: | 83 | this is, with the following encoding: |
84 | 84 | ||
85 | enum perf_event_types { | 85 | enum perf_type_id { |
86 | PERF_TYPE_HARDWARE = 0, | 86 | PERF_TYPE_HARDWARE = 0, |
87 | PERF_TYPE_SOFTWARE = 1, | 87 | PERF_TYPE_SOFTWARE = 1, |
88 | PERF_TYPE_TRACEPOINT = 2, | 88 | PERF_TYPE_TRACEPOINT = 2, |
@@ -95,7 +95,7 @@ specified by 'event_id': | |||
95 | * Generalized performance counter event types, used by the hw_event.event_id | 95 | * Generalized performance counter event types, used by the hw_event.event_id |
96 | * parameter of the sys_perf_event_open() syscall: | 96 | * parameter of the sys_perf_event_open() syscall: |
97 | */ | 97 | */ |
98 | enum hw_event_ids { | 98 | enum perf_hw_id { |
99 | /* | 99 | /* |
100 | * Common hardware events, generalized by the kernel: | 100 | * Common hardware events, generalized by the kernel: |
101 | */ | 101 | */ |
@@ -129,7 +129,7 @@ software events, selected by 'event_id': | |||
129 | * physical and sw events of the kernel (and allow the profiling of them as | 129 | * physical and sw events of the kernel (and allow the profiling of them as |
130 | * well): | 130 | * well): |
131 | */ | 131 | */ |
132 | enum sw_event_ids { | 132 | enum perf_sw_ids { |
133 | PERF_COUNT_SW_CPU_CLOCK = 0, | 133 | PERF_COUNT_SW_CPU_CLOCK = 0, |
134 | PERF_COUNT_SW_TASK_CLOCK = 1, | 134 | PERF_COUNT_SW_TASK_CLOCK = 1, |
135 | PERF_COUNT_SW_PAGE_FAULTS = 2, | 135 | PERF_COUNT_SW_PAGE_FAULTS = 2, |
@@ -230,7 +230,7 @@ these events are recorded in the ring-buffer (see below). | |||
230 | The 'comm' bit allows tracking of process comm data on process creation. | 230 | The 'comm' bit allows tracking of process comm data on process creation. |
231 | This too is recorded in the ring-buffer (see below). | 231 | This too is recorded in the ring-buffer (see below). |
232 | 232 | ||
233 | The 'pid' parameter to the perf_event_open() system call allows the | 233 | The 'pid' parameter to the sys_perf_event_open() system call allows the |
234 | counter to be specific to a task: | 234 | counter to be specific to a task: |
235 | 235 | ||
236 | pid == 0: if the pid parameter is zero, the counter is attached to the | 236 | pid == 0: if the pid parameter is zero, the counter is attached to the |
@@ -260,7 +260,7 @@ The 'flags' parameter is currently unused and must be zero. | |||
260 | 260 | ||
261 | The 'group_fd' parameter allows counter "groups" to be set up. A | 261 | The 'group_fd' parameter allows counter "groups" to be set up. A |
262 | counter group has one counter which is the group "leader". The leader | 262 | counter group has one counter which is the group "leader". The leader |
263 | is created first, with group_fd = -1 in the perf_event_open call | 263 | is created first, with group_fd = -1 in the sys_perf_event_open call |
264 | that creates it. The rest of the group members are created | 264 | that creates it. The rest of the group members are created |
265 | subsequently, with group_fd giving the fd of the group leader. | 265 | subsequently, with group_fd giving the fd of the group leader. |
266 | (A single counter on its own is created with group_fd = -1 and is | 266 | (A single counter on its own is created with group_fd = -1 and is |