diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-12-22 11:54:50 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-12-22 11:54:50 +0100 |
commit | 8c1df4002aa425973d7d25ffa56c042acd953bed (patch) | |
tree | 441e39bf3a43bb3e4c4965ed2081b9bb90edd1ea /tools/perf/builtin-record.c | |
parent | 6c529a266bdc590a870ee2d2092ff6527eff427b (diff) | |
parent | 21dd9ae5a4e9f717f3957ec934dd3158129436b8 (diff) | |
download | linux-8c1df4002aa425973d7d25ffa56c042acd953bed.tar.bz2 |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index e9be6ae87a27..5149e3deb7bc 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -285,7 +285,7 @@ static void create_counter(int counter, int cpu) if (system_wide) attr->sample_type |= PERF_SAMPLE_CPU; - if (sample_time) + if (sample_time || system_wide || !no_inherit || cpu_list) attr->sample_type |= PERF_SAMPLE_TIME; if (raw_samples) { @@ -327,6 +327,9 @@ try_again: * Old kernel, no attr->sample_id_type_all field */ sample_id_all_avail = false; + if (!sample_time && !raw_samples) + attr->sample_type &= ~PERF_SAMPLE_TIME; + goto retry_sample_id; } @@ -572,7 +575,7 @@ static int __cmd_record(int argc, const char **argv) } session = perf_session__new(output_name, O_WRONLY, - write_mode == WRITE_FORCE, false); + write_mode == WRITE_FORCE, false, NULL); if (session == NULL) { pr_err("Not enough memory for reading perf file header\n"); return -1; |