From b51e829cfaf4feaa3c9516c23ff87d53d0274445 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 15 May 2009 15:19:29 +0200 Subject: [PATCH] --- yaml --- r: 147463 b: refs/heads/master c: f5456a6b056b709282e87a68b4c1b81ac2e866fa h: refs/heads/master i: 147461: 2227eedf4123f21fa2b6610e5bbc28fd6e6e8e5a 147459: 1573099cf9c1b752b90a4797563c55bdc212be87 147455: cada1d8d5107b95ef6be094bd663490652adfd4e v: v3 --- [refs] | 2 +- trunk/Documentation/perf_counter/builtin-top.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 6f1abc4473db..6f9e1f745343 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 60db5e09c13109b13830cc9dcae688003fd39e79 +refs/heads/master: f5456a6b056b709282e87a68b4c1b81ac2e866fa diff --git a/trunk/Documentation/perf_counter/builtin-top.c b/trunk/Documentation/perf_counter/builtin-top.c index b1549dd27720..814b2e4925e3 100644 --- a/trunk/Documentation/perf_counter/builtin-top.c +++ b/trunk/Documentation/perf_counter/builtin-top.c @@ -98,6 +98,7 @@ static unsigned int page_size; static unsigned int mmap_pages = 16; static int use_mmap = 0; static int use_munmap = 0; +static int freq = 0; static char *vmlinux; @@ -846,9 +847,10 @@ static void process_options(int argc, char **argv) {"stat", no_argument, NULL, 'S'}, {"vmlinux", required_argument, NULL, 'x'}, {"zero", no_argument, NULL, 'z'}, + {"freq", required_argument, NULL, 'F'}, {NULL, 0, NULL, 0 } }; - int c = getopt_long(argc, argv, "+:ac:C:d:De:f:g:hln:m:p:r:s:Sx:zMU", + int c = getopt_long(argc, argv, "+:ac:C:d:De:f:g:hln:m:p:r:s:Sx:zMUF:", long_options, &option_index); if (c == -1) break; @@ -889,6 +891,7 @@ static void process_options(int argc, char **argv) case 'm': mmap_pages = atoi(optarg); break; case 'M': use_mmap = 1; break; case 'U': use_munmap = 1; break; + case 'F': freq = 1; default_interval = atoi(optarg); break; default: error = 1; break; } } @@ -1075,6 +1078,7 @@ int cmd_top(int argc, char **argv, const char *prefix) hw_event.nmi = nmi; hw_event.mmap = use_mmap; hw_event.munmap = use_munmap; + hw_event.freq = freq; fd[i][counter] = sys_perf_counter_open(&hw_event, tid, cpu, group_fd, 0); if (fd[i][counter] < 0) {