Home Home > GIT Browse > stable-xen
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 11:41:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 12:19:59 +0200
commit48aaff1bcde75b09429d780be4b57d25be4cab9a (patch)
treeaa6e2f42ced5a7ad18aedcf4dc8148f102082e22
parentec39812d211737fcd02248d4f8bab6bf77d542cb (diff)
Revert "perf record: Fix crash in pipe mode"
This reverts commit f766148e47d7d3b8a7128cae511971c0f793e38e which is commit ad46e48c65fa1f204fa29eaff1b91174d314a94b upstream. It breaks the build. Turns out we don't test perf on stable releases, we need to fix that :( Reported-by: Pavlos Parissis <pavlos.parissis@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--tools/perf/builtin-record.c9
-rw-r--r--tools/perf/perf.h1
-rw-r--r--tools/perf/util/record.c8
3 files changed, 2 insertions, 16 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3b570e808b31..b205c1340456 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -926,15 +926,6 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
}
}
- /*
- * If we have just single event and are sending data
- * through pipe, we need to force the ids allocation,
- * because we synthesize event name through the pipe
- * and need the id for that.
- */
- if (data->is_pipe && rec->evlist->nr_entries == 1)
- rec->opts.sample_id = true;
-
if (record__open(rec) != 0) {
err = -1;
goto out_child;
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index de1debcd3ee7..55086389fc06 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -61,7 +61,6 @@ struct record_opts {
bool tail_synthesize;
bool overwrite;
bool ignore_missing_thread;
- bool sample_id;
unsigned int freq;
unsigned int mmap_pages;
unsigned int auxtrace_mmap_pages;
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index 6f09e4962dad..1e97937b03a9 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -137,7 +137,6 @@ void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts,
struct perf_evsel *evsel;
bool use_sample_identifier = false;
bool use_comm_exec;
- bool sample_id = opts->sample_id;
/*
* Set the evsel leader links before we configure attributes,
@@ -164,7 +163,8 @@ void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts,
* match the id.
*/
use_sample_identifier = perf_can_sample_identifier();
- sample_id = true;
+ evlist__for_each_entry(evlist, evsel)
+ perf_evsel__set_sample_id(evsel, use_sample_identifier);
} else if (evlist->nr_entries > 1) {
struct perf_evsel *first = perf_evlist__first(evlist);
@@ -174,10 +174,6 @@ void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts,
use_sample_identifier = perf_can_sample_identifier();
break;
}
- sample_id = true;
- }
-
- if (sample_id) {
evlist__for_each_entry(evlist, evsel)
perf_evsel__set_sample_id(evsel, use_sample_identifier);
}