From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755794AbbIHOit (ORCPT ); Tue, 8 Sep 2015 10:38:49 -0400 Received: from terminus.zytor.com ([198.137.202.10]:52460 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755075AbbIHOip (ORCPT ); Tue, 8 Sep 2015 10:38:45 -0400 Date: Tue, 8 Sep 2015 07:38:25 -0700 From: tip-bot for Kan Liang Message-ID: Cc: acme@redhat.com, jolsa@kernel.org, luto@kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, mark.rutland@arm.com, mingo@kernel.org, a.p.zijlstra@chello.nl, eranian@google.com, ak@linux.intel.com, hpa@zytor.com, kan.liang@intel.com, tglx@linutronix.de, namhyung@kernel.org Reply-To: eranian@google.com, ak@linux.intel.com, hpa@zytor.com, kan.liang@intel.com, tglx@linutronix.de, namhyung@kernel.org, acme@redhat.com, adrian.hunter@intel.com, luto@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, mingo@kernel.org, mark.rutland@arm.com In-Reply-To: <1441283463-51050-5-git-send-email-kan.liang@intel.com> References: <1441283463-51050-5-git-send-email-kan.liang@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf session: Don't call dump_sample() when evsel is NULL Git-Commit-ID: 1b29ac59b1d692c06ec543a5f35e0d9ebb98e003 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 1b29ac59b1d692c06ec543a5f35e0d9ebb98e003 Gitweb: http://git.kernel.org/tip/1b29ac59b1d692c06ec543a5f35e0d9ebb98e003 Author: Kan Liang AuthorDate: Thu, 3 Sep 2015 08:31:00 -0400 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 4 Sep 2015 12:01:04 -0300 perf session: Don't call dump_sample() when evsel is NULL Need to check evsel before passing it to dump_sample(). Signed-off-by: Kan Liang Cc: Adrian Hunter Cc: Andi Kleen Cc: Andy Lutomirski Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1441283463-51050-5-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 61669be..23fed17 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1080,11 +1080,11 @@ 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); if (machine == NULL) { ++evlist->stats.nr_unprocessable_samples; return 0;