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>
This commit is contained in:
Ingo Molnar 2009-10-06 15:14:21 +02:00
parent 064739bc4b
commit 42e59d7d19
2 changed files with 44 additions and 44 deletions

View file

@ -32,7 +32,7 @@ static long default_interval = 100000;
static int nr_cpus = 0; static int nr_cpus = 0;
static unsigned int page_size; static unsigned int page_size;
static unsigned int mmap_pages = 128; static unsigned int mmap_pages = 128;
static int freq = 0; static int freq = 1000;
static int output; static int output;
static const char *output_name = "perf.data"; static const char *output_name = "perf.data";
static int group = 0; static int group = 0;
@ -52,20 +52,20 @@ static int sample_address = 0;
static int multiplex = 0; static int multiplex = 0;
static int multiplex_fd = -1; static int multiplex_fd = -1;
static long samples; static long samples = 0;
static struct timeval last_read; static struct timeval last_read;
static struct timeval this_read; static struct timeval this_read;
static u64 bytes_written; static u64 bytes_written = 0;
static struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS]; static struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS];
static int nr_poll; static int nr_poll = 0;
static int nr_cpu; static int nr_cpu = 0;
static int file_new = 1; static int file_new = 1;
struct perf_header *header; struct perf_header *header = NULL;
struct mmap_data { struct mmap_data {
int counter; int counter;

View file

@ -70,11 +70,11 @@ static unsigned int realtime_prio = 0;
static int group = 0; static int group = 0;
static unsigned int page_size; static unsigned int page_size;
static unsigned int mmap_pages = 16; static unsigned int mmap_pages = 16;
static int freq = 0; static int freq = 1000; /* 1 KHz */
static int delay_secs = 2; static int delay_secs = 2;
static int zero; static int zero = 0;
static int dump_symtab; static int dump_symtab = 0;
/* /*
* Source * Source