diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-06 09:14:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-06 09:41:09 -0400 |
commit | 42e59d7d19dc4b49feab2a860fd9a8ca3248c833 (patch) | |
tree | a1c597604dcb239804684f452263bec295d77ae3 /tools/perf/builtin-record.c | |
parent | 064739bc4b3d7f424b2f25547e6611bcf0132415 (diff) |
perf tools: Default to 1 KHz auto-sampling freq events
Use auto-freq events by default in perf record and
perf top.
This allows more consistent hardware event sampling,
regardless of the intensity of the underlying event.
It also keeps us from over-sampling on larger/busier
systems.
(also make surrounding initializations more consistent)
Cc: 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>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 3eeef339c787..494f8c7d7521 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -29,43 +29,43 @@ static int fd[MAX_NR_CPUS][MAX_COUNTERS]; | |||
29 | 29 | ||
30 | static long default_interval = 100000; | 30 | static long default_interval = 100000; |
31 | 31 | ||
32 | static int nr_cpus = 0; | 32 | static int nr_cpus = 0; |
33 | static unsigned int page_size; | 33 | static unsigned int page_size; |
34 | static unsigned int mmap_pages = 128; | 34 | static unsigned int mmap_pages = 128; |
35 | static int freq = 0; | 35 | static int freq = 1000; |
36 | static int output; | 36 | static int output; |
37 | static const char *output_name = "perf.data"; | 37 | static const char *output_name = "perf.data"; |
38 | static int group = 0; | 38 | static int group = 0; |
39 | static unsigned int realtime_prio = 0; | 39 | static unsigned int realtime_prio = 0; |
40 | static int raw_samples = 0; | 40 | static int raw_samples = 0; |
41 | static int system_wide = 0; | 41 | static int system_wide = 0; |
42 | static int profile_cpu = -1; | 42 | static int profile_cpu = -1; |
43 | static pid_t target_pid = -1; | 43 | static pid_t target_pid = -1; |
44 | static pid_t child_pid = -1; | 44 | static pid_t child_pid = -1; |
45 | static int inherit = 1; | 45 | static int inherit = 1; |
46 | static int force = 0; | 46 | static int force = 0; |
47 | static int append_file = 0; | 47 | static int append_file = 0; |
48 | static int call_graph = 0; | 48 | static int call_graph = 0; |
49 | static int inherit_stat = 0; | 49 | static int inherit_stat = 0; |
50 | static int no_samples = 0; | 50 | static int no_samples = 0; |
51 | static int sample_address = 0; | 51 | static int sample_address = 0; |
52 | static int multiplex = 0; | 52 | static int multiplex = 0; |
53 | static int multiplex_fd = -1; | 53 | static int multiplex_fd = -1; |
54 | 54 | ||
55 | static long samples; | 55 | static long samples = 0; |
56 | static struct timeval last_read; | 56 | static struct timeval last_read; |
57 | static struct timeval this_read; | 57 | static struct timeval this_read; |
58 | 58 | ||
59 | static u64 bytes_written; | 59 | static u64 bytes_written = 0; |
60 | 60 | ||
61 | static struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS]; | 61 | static struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS]; |
62 | 62 | ||
63 | static int nr_poll; | 63 | static int nr_poll = 0; |
64 | static int nr_cpu; | 64 | static int nr_cpu = 0; |
65 | 65 | ||
66 | static int file_new = 1; | 66 | static int file_new = 1; |
67 | 67 | ||
68 | struct perf_header *header; | 68 | struct perf_header *header = NULL; |
69 | 69 | ||
70 | struct mmap_data { | 70 | struct mmap_data { |
71 | int counter; | 71 | int counter; |