Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Update some code references in design.txt

Update the names of some functions and enums in design.txt. The document
still has some stale information, but the motivation behind this patch
is to allow a developer to quickly grep and learn about the associated
structures.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1395169804-1293-1-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ramkumar Ramachandra and committed by
Arnaldo Carvalho de Melo
b68eebd1 a33f6efc

+6 -6
+6 -6
tools/perf/design.txt
··· 18 18 Performance counters are accessed via special file descriptors. 19 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 22 system call: 23 23 24 24 int sys_perf_event_open(struct perf_event_attr *hw_event_uptr, ··· 82 82 If 'raw_type' is 0, then the 'type' field says what kind of counter 83 83 this is, with the following encoding: 84 84 85 - enum perf_event_types { 85 + enum perf_type_id { 86 86 PERF_TYPE_HARDWARE = 0, 87 87 PERF_TYPE_SOFTWARE = 1, 88 88 PERF_TYPE_TRACEPOINT = 2, ··· 95 95 * Generalized performance counter event types, used by the hw_event.event_id 96 96 * parameter of the sys_perf_event_open() syscall: 97 97 */ 98 - enum hw_event_ids { 98 + enum perf_hw_id { 99 99 /* 100 100 * Common hardware events, generalized by the kernel: 101 101 */ ··· 129 129 * physical and sw events of the kernel (and allow the profiling of them as 130 130 * well): 131 131 */ 132 - enum sw_event_ids { 132 + enum perf_sw_ids { 133 133 PERF_COUNT_SW_CPU_CLOCK = 0, 134 134 PERF_COUNT_SW_TASK_CLOCK = 1, 135 135 PERF_COUNT_SW_PAGE_FAULTS = 2, ··· 230 230 The 'comm' bit allows tracking of process comm data on process creation. 231 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 234 counter to be specific to a task: 235 235 236 236 pid == 0: if the pid parameter is zero, the counter is attached to the ··· 260 260 261 261 The 'group_fd' parameter allows counter "groups" to be set up. A 262 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 264 that creates it. The rest of the group members are created 265 265 subsequently, with group_fd giving the fd of the group leader. 266 266 (A single counter on its own is created with group_fd = -1 and is