diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-05 08:29:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-05 08:32:19 -0400 |
commit | 2debbc836696f2a815d02630230584a1754a5022 (patch) | |
tree | f04f2eca0ed514ab996cfbb29d69af1ea22481e1 /Documentation/perf_counter/builtin-record.c | |
parent | 8edd4286f99f78fe07fe9196e69d5643da86cada (diff) |
perf_counter tools: Clarify events/samples naming
A number of places said 'events' while they should say 'samples'.
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/builtin-record.c')
-rw-r--r-- | Documentation/perf_counter/builtin-record.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c index e2301f39e55..d4ad3057a71 100644 --- a/Documentation/perf_counter/builtin-record.c +++ b/Documentation/perf_counter/builtin-record.c | |||
@@ -65,7 +65,7 @@ static unsigned int mmap_read_head(struct mmap_data *md) | |||
65 | return head; | 65 | return head; |
66 | } | 66 | } |
67 | 67 | ||
68 | static long events; | 68 | static long samples; |
69 | static struct timeval last_read, this_read; | 69 | static struct timeval last_read, this_read; |
70 | 70 | ||
71 | static __u64 bytes_written; | 71 | static __u64 bytes_written; |
@@ -83,7 +83,7 @@ static void mmap_read(struct mmap_data *md) | |||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * If we're further behind than half the buffer, there's a chance | 85 | * If we're further behind than half the buffer, there's a chance |
86 | * the writer will bite our tail and screw up the events under us. | 86 | * the writer will bite our tail and mess up the samples under us. |
87 | * | 87 | * |
88 | * If we somehow ended up ahead of the head, we got messed up. | 88 | * If we somehow ended up ahead of the head, we got messed up. |
89 | * | 89 | * |
@@ -109,7 +109,7 @@ static void mmap_read(struct mmap_data *md) | |||
109 | last_read = this_read; | 109 | last_read = this_read; |
110 | 110 | ||
111 | if (old != head) | 111 | if (old != head) |
112 | events++; | 112 | samples++; |
113 | 113 | ||
114 | size = head - old; | 114 | size = head - old; |
115 | 115 | ||
@@ -257,7 +257,7 @@ out_failure: | |||
257 | exit(EXIT_FAILURE); | 257 | exit(EXIT_FAILURE); |
258 | } | 258 | } |
259 | 259 | ||
260 | static void pid_synthesize_mmap_events(pid_t pid) | 260 | static void pid_synthesize_mmap_samples(pid_t pid) |
261 | { | 261 | { |
262 | char filename[PATH_MAX]; | 262 | char filename[PATH_MAX]; |
263 | FILE *fp; | 263 | FILE *fp; |
@@ -315,7 +315,7 @@ static void pid_synthesize_mmap_events(pid_t pid) | |||
315 | fclose(fp); | 315 | fclose(fp); |
316 | } | 316 | } |
317 | 317 | ||
318 | static void synthesize_events(void) | 318 | static void synthesize_samples(void) |
319 | { | 319 | { |
320 | DIR *proc; | 320 | DIR *proc; |
321 | struct dirent dirent, *next; | 321 | struct dirent dirent, *next; |
@@ -331,7 +331,7 @@ static void synthesize_events(void) | |||
331 | continue; | 331 | continue; |
332 | 332 | ||
333 | pid_synthesize_comm_event(pid, 1); | 333 | pid_synthesize_comm_event(pid, 1); |
334 | pid_synthesize_mmap_events(pid); | 334 | pid_synthesize_mmap_samples(pid); |
335 | } | 335 | } |
336 | 336 | ||
337 | closedir(proc); | 337 | closedir(proc); |
@@ -396,7 +396,7 @@ static void open_counters(int cpu, pid_t pid) | |||
396 | 396 | ||
397 | if (pid > 0) { | 397 | if (pid > 0) { |
398 | pid_synthesize_comm_event(pid, 0); | 398 | pid_synthesize_comm_event(pid, 0); |
399 | pid_synthesize_mmap_events(pid); | 399 | pid_synthesize_mmap_samples(pid); |
400 | } | 400 | } |
401 | 401 | ||
402 | group_fd = -1; | 402 | group_fd = -1; |
@@ -469,17 +469,17 @@ static int __cmd_record(int argc, const char **argv) | |||
469 | } | 469 | } |
470 | 470 | ||
471 | if (system_wide) | 471 | if (system_wide) |
472 | synthesize_events(); | 472 | synthesize_samples(); |
473 | 473 | ||
474 | while (!done) { | 474 | while (!done) { |
475 | int hits = events; | 475 | int hits = samples; |
476 | 476 | ||
477 | for (i = 0; i < nr_cpu; i++) { | 477 | for (i = 0; i < nr_cpu; i++) { |
478 | for (counter = 0; counter < nr_counters; counter++) | 478 | for (counter = 0; counter < nr_counters; counter++) |
479 | mmap_read(&mmap_array[i][counter]); | 479 | mmap_read(&mmap_array[i][counter]); |
480 | } | 480 | } |
481 | 481 | ||
482 | if (hits == events) | 482 | if (hits == samples) |
483 | ret = poll(event_array, nr_poll, 100); | 483 | ret = poll(event_array, nr_poll, 100); |
484 | } | 484 | } |
485 | 485 | ||
@@ -487,7 +487,7 @@ static int __cmd_record(int argc, const char **argv) | |||
487 | * Approximate RIP event size: 24 bytes. | 487 | * Approximate RIP event size: 24 bytes. |
488 | */ | 488 | */ |
489 | fprintf(stderr, | 489 | fprintf(stderr, |
490 | "[ perf record: Captured and wrote %.3f MB %s (~%lld events) ]\n", | 490 | "[ perf record: Captured and wrote %.3f MB %s (~%lld samples) ]\n", |
491 | (double)bytes_written / 1024.0 / 1024.0, | 491 | (double)bytes_written / 1024.0 / 1024.0, |
492 | output_name, | 492 | output_name, |
493 | bytes_written / 24); | 493 | bytes_written / 24); |