aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-02-08 10:27:39 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-02-08 12:03:36 -0500
commitce6f4fab4059cd72638a0cfa596a8ee2c79c1c8e (patch)
tree00416d7a54d9ef265b9358022e804217dcb5d870 /tools/perf/builtin-report.c
parente3087b80aa0bceda9863f33307460f3ba79f2b15 (diff)
perf annotate: Move locking to struct annotation
Since we'll need it when implementing the live annotate TUI browser. This also simplifies things a bit by having the list head for the source code to be in the dynamicly allocated part of struct annotation, that way we don't have to pass it around, it can be found from the struct symbol that is passed everywhere. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index de06bf55efff..f403aced4cba 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -123,7 +123,7 @@ static int perf_session__add_hist_entry(struct perf_session *session,
123 * All aggregated on the first sym_hist. 123 * All aggregated on the first sym_hist.
124 */ 124 */
125 struct annotation *notes = symbol__annotation(he->ms.sym); 125 struct annotation *notes = symbol__annotation(he->ms.sym);
126 if (notes->histograms == NULL && 126 if (notes->src == NULL &&
127 symbol__alloc_hist(he->ms.sym, 1) < 0) 127 symbol__alloc_hist(he->ms.sym, 1) < 0)
128 err = -ENOMEM; 128 err = -ENOMEM;
129 else 129 else
@@ -166,7 +166,8 @@ static int process_sample_event(union perf_event *event,
166 struct addr_location al; 166 struct addr_location al;
167 struct perf_event_attr *attr; 167 struct perf_event_attr *attr;
168 168
169 if (perf_event__preprocess_sample(event, session, &al, sample, NULL) < 0) { 169 if (perf_event__preprocess_sample(event, session, &al, sample,
170 symbol__annotate_init) < 0) {
170 fprintf(stderr, "problem processing %d event, skipping it.\n", 171 fprintf(stderr, "problem processing %d event, skipping it.\n",
171 event->header.type); 172 event->header.type);
172 return -1; 173 return -1;