From aae7c1511bf7bd22ecabe39484f23a6179e354ca Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Wed, 12 Jan 2011 17:59:36 +0300 Subject: [PATCH] --- yaml --- r: 231495 b: refs/heads/master c: acac03fa15a8684bb60489ed87b5aae5258c0838 h: refs/heads/master i: 231493: 94003b83352b350c484fd42f0444856188aeb324 231491: fd2f1ea7fca4e701c3263098ba731e770f5867ea 231487: 418d581ace8d65e236f856904ce627eaa586b84d v: v3 --- [refs] | 2 +- trunk/tools/perf/Documentation/perf-record.txt | 3 +++ trunk/tools/perf/builtin-record.c | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6d7fb02eb767..44feb0697a12 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9710118bd4e7f3406865171cb9b9c94547c1c2f9 +refs/heads/master: acac03fa15a8684bb60489ed87b5aae5258c0838 diff --git a/trunk/tools/perf/Documentation/perf-record.txt b/trunk/tools/perf/Documentation/perf-record.txt index 52462ae26455..e032716c839b 100644 --- a/trunk/tools/perf/Documentation/perf-record.txt +++ b/trunk/tools/perf/Documentation/perf-record.txt @@ -61,6 +61,9 @@ OPTIONS -r:: --realtime=:: Collect data with this RT SCHED_FIFO priority. +-D:: +--no-delay:: + Collect data without buffering. -A:: --append:: Append to the output file to do incremental profiling. diff --git a/trunk/tools/perf/builtin-record.c b/trunk/tools/perf/builtin-record.c index 1210e6484ad5..df6064ad9bf2 100644 --- a/trunk/tools/perf/builtin-record.c +++ b/trunk/tools/perf/builtin-record.c @@ -49,6 +49,7 @@ static int pipe_output = 0; static const char *output_name = "perf.data"; static int group = 0; static int realtime_prio = 0; +static bool nodelay = false; static bool raw_samples = false; static bool sample_id_all_avail = true; static bool system_wide = false; @@ -307,6 +308,11 @@ static void create_counter(struct perf_evsel *evsel, int cpu) attr->sample_type |= PERF_SAMPLE_CPU; } + if (nodelay) { + attr->watermark = 0; + attr->wakeup_events = 1; + } + attr->mmap = track; attr->comm = track; attr->inherit = !no_inherit; @@ -843,6 +849,8 @@ const struct option record_options[] = { "record events on existing thread id"), OPT_INTEGER('r', "realtime", &realtime_prio, "collect data with this RT SCHED_FIFO priority"), + OPT_BOOLEAN('D', "no-delay", &nodelay, + "collect data without buffering"), OPT_BOOLEAN('R', "raw-samples", &raw_samples, "collect raw sample records from all opened counters"), OPT_BOOLEAN('a', "all-cpus", &system_wide,