perf tools: Fix counter sample frequency breakage
authorMike Galbraith <efault@gmx.de>
Mon, 12 Oct 2009 05:56:03 +0000 (07:56 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 12 Oct 2009 07:10:55 +0000 (09:10 +0200)
commit7e4ff9e3e8f88de8a8536f43294cd32b4e7d9123
tree4033b2ab865ce039f0287059c520be8703a08d42
parentfe9081cc9bdabb0be953a39ad977cea14e35bce5
perf tools: Fix counter sample frequency breakage

Commit 42e59d7d19dc4b4 switched to a default sample frequency of
1KHz, which overrides any user supplied count, causing sched, top
and timechart to miss events due to their discrete events
being flagged PERF_SAMPLE_PERIOD.

Override default sample frequency when the user profides a
period count, and make both record and top honor that user
supplied option.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <1255326963.15107.2.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-record.c
tools/perf/builtin-top.c