Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3539751ybz; Mon, 20 Apr 2020 04:58:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJwerOwwrknSQpvbCrLhziTfBQafIbA+jQrAZ+cou0T6L5RrT1rx7iwhxSByanaTJveCfGj X-Received: by 2002:a17:907:1199:: with SMTP id uz25mr15696595ejb.131.1587383892644; Mon, 20 Apr 2020 04:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587383892; cv=none; d=google.com; s=arc-20160816; b=QkJddzvOVij786hKGtUAJI9Y8kaxWolJACNb6J3GN45tTqX0ErFNp1XyO9hp7dQ9bD hyHRL/Kfc6HhDlJIV5l+LGdpEUa1K5ocW5JGDHL+P5qZEj+UX5BN0zZUIhoqksPg/zZg UGO5bvJMYqf2ttPmO5Zrj/BbMg49cCRe8g8I/VRdUiDlf8pxm1i9MNvoSZ1C5j/keh4m LTTb+4IdCdR3NPozKY/bxduJVKTSRz1a3R9Omlp3Xw/4QbNZh1+aGSI1rTxTaRBDioFM 937UrsngcWr9YRsYuVpkp3+2IaLrO4sFAYARj3CbiuQWITMddOKveF98drVX1oKLz8au vcgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=65kSndjJDhdJgj9ITlsb01bLiXxOUZLu4iPnP7nDmS4=; b=LzeKSzSUlQ4fxJ0Wr/odwEi7Dj2ECUInb0freyyZ5FCgzCO+HUzInecAPHDMdRWP/A G2CpmaFRNiZoxsIDlh78aIXXXpl7PL00t5JXOl2+GzRtNNGwdkgJ1wL25ynqYufGHbP1 MSwB03HwYq3MDSDJdrCnHaK/XO8tL7zbGzcu3ae6szuE2dCCvIWoxps4HilFfQ7VggeF pxobUrQm0RsuhmncTwSippREkWI3xgee+Q5egYKNVehMAPiHLWzTnay+V95kA5NL7Upf QsirqsgcWJpGqMy12ETBVhmRyoE4/HwP54+nHi+HZaUZkvj2FLDYqL18sEjfro6sRy/z C4CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Npmsm1Xj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx8si370232edb.25.2020.04.20.04.57.49; Mon, 20 Apr 2020 04:58:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Npmsm1Xj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbgDTL4E (ORCPT + 99 others); Mon, 20 Apr 2020 07:56:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:40350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbgDTL4D (ORCPT ); Mon, 20 Apr 2020 07:56:03 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78A7D22247; Mon, 20 Apr 2020 11:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383763; bh=vdvOi+Ce8V9fnCpjaDr9goTOMSib+LLdvRLkg3LvhZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Npmsm1Xj0v3vEIheBAaP3x46M5xLasQ0NDy4t2X7fuhX5nGLzCq8AiEmPaZgnytHF mBlUlBU4AOlu1jGWSC6jawhbJahaCld75wLdII0shTUatXZYvqCvhJkDWjGp5OW/aB ejWPN5ed56AlyvwRvsaGSNKkeH4ZcwzdsmqNH9eA= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 34/60] perf evsel: Be consistent when looking which evsel PERF_SAMPLE_ bits are set Date: Mon, 20 Apr 2020 08:52:50 -0300 Message-Id: <20200420115316.18781-35-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200420115316.18781-1-acme@kernel.org> References: <20200420115316.18781-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter Using 'type' variable for checking for callchains is equivalent to using evsel__has_callchain(evsel) and is how the other PERF_SAMPLE_ bits are checked in this function, so use it to be consistent. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200401101613.6201-11-adrian.hunter@intel.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index d23db6755f51..f320adaf1326 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2136,7 +2136,7 @@ int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event, } } - if (evsel__has_callchain(evsel)) { + if (type & PERF_SAMPLE_CALLCHAIN) { const u64 max_callchain_nr = UINT64_MAX / sizeof(u64); OVERFLOW_CHECK_u64(array); -- 2.21.1