Messages in this thread | | | Date | Mon, 31 Aug 2015 17:33:39 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH V7 6/8] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D |
| |
Em Mon, Aug 31, 2015 at 01:19:40PM +0200, Jiri Olsa escreveu: > On Fri, Aug 28, 2015 at 05:48:07AM -0400, Kan Liang wrote: > > SNIP > > > > > static struct machine *machines__find_for_cpumode(struct machines *machines, > > @@ -1079,11 +1101,12 @@ static int machines__deliver_event(struct machines *machines, > > > > switch (event->header.type) { > > case PERF_RECORD_SAMPLE: > > - dump_sample(evsel, event, sample); > > if (evsel == NULL) { > > ++evlist->stats.nr_unknown_id; > > return 0; > > } > > + dump_sample(evsel, event, sample); > > + > > could you submit this hunk separately.. seems like we could > segfault in dump_sample if there's evsel == NULL, right?
Right, this one should be submitted separately, if there is a test right after we use a pointer, I wouldn't even think about reading dump_sample() code :-)
- Arnaldo
| |