Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbbHaUdo (ORCPT ); Mon, 31 Aug 2015 16:33:44 -0400 Received: from mail.kernel.org ([198.145.29.136]:48082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbbHaUdn (ORCPT ); Mon, 31 Aug 2015 16:33:43 -0400 Date: Mon, 31 Aug 2015 17:33:39 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Kan Liang , jolsa@kernel.org, a.p.zijlstra@chello.nl, luto@kernel.org, mingo@redhat.com, eranian@google.com, ak@linux.intel.com, mark.rutland@arm.com, adrian.hunter@intel.com, namhyung@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V7 6/8] perf,tools: Dump per-sample freq/CPU%/CORE_BUSY% in report -D Message-ID: <20150831203339.GJ4423@kernel.org> References: <1440755289-30939-1-git-send-email-kan.liang@intel.com> <1440755289-30939-7-git-send-email-kan.liang@intel.com> <20150831111940.GI22039@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150831111940.GI22039@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 32 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/