From patchwork Tue Dec 18 22:06:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 154209 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4235764ljp; Tue, 18 Dec 2018 14:10:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vicz8Kzf/llFXxf2c0W2m7mWmm2ytK7wVQphufyfI7QgkcvecBdNi+0xCLbBwnpLVvyLeb X-Received: by 2002:a63:561b:: with SMTP id k27mr17237275pgb.271.1545171040295; Tue, 18 Dec 2018 14:10:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545171040; cv=none; d=google.com; s=arc-20160816; b=hoMUx3A8uhpRda+xhbLr6dycK6SCSdhQrEOKguyOh955cIetoEaoZgK4HS3JK2CNCt c6yuty2GYvBMCMelM/q5dSnDqn/wq0EDLQ0Ew6OorZI3nK9GqmWkugkEQmdC9O7C6d44 Wycjr1H5vh3DIdsaJwbx6ofcZHek2Q31/bgvTS6eSwRJTZdi3v91bbx7l1t58UchX4rP 6Nd3owt1MNIBuzI7/B6OiStZEaga8jQ7XnCFsA9wlIqTPGg8QpiKpTeTDZeEcziN0abU j+ETaQI+68s5kYpb0dSH5hfl7Ybi9l3zXNpKnrqcO8Ke89EGFTHnYwtPA2COmv7m4YyE xRDA== 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=DGLIoUsDQCXde4abl20d6ZnSNtetLmuA6rrdRe/h3y8=; b=wvUkDhi/u1273kGY+WyMRmhpptEQBkakO6LIncWcALHPSVhN3EfMC6AM72FAzlNfgb OafNoAlbtEPtrGS482D6mlQCLhKdeNnnJzWXimPV2Iz/yM/pOSlkUD9/cN63dFKdtfua eez67orpy1uUL/N5qOIjWU3IFEx6tGUoh1h/sAHx/OkRWFy/FZhdp2LvMiDVNyhWdzv2 ibVdnnOD10EqOPrx/q0kXpXG0XEkK/UrYScDSamPtpY+tnv5MlG2ihbOwI1OVZxvZlL+ eV6FkFpWoKGJ1WtpBABKDuFu1IBedNGboZiRrvFmB/hS5wRsHOq9q8ruWpRKWnAzS5fT acaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Owzfmzw1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p18si13768105plo.223.2018.12.18.14.10.40; Tue, 18 Dec 2018 14:10:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Owzfmzw1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728067AbeLRWKj (ORCPT + 31 others); Tue, 18 Dec 2018 17:10:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:39192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726706AbeLRWKg (ORCPT ); Tue, 18 Dec 2018 17:10:36 -0500 Received: from quaco.ghostprotocols.net (unknown [189.40.101.1]) (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 2A577218A2; Tue, 18 Dec 2018 22:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545171036; bh=SqmRLABnXNmbqu4cRZLHpt48Y33TI7BUDq8tMlrlags=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Owzfmzw1OqM47NqixnWgc+qsT0AnMzzXFjRi9+n1rKID8+SMcTf6EbWqu4XlB3g10 sgF3NW8dpgnRRlRDSGGZHJLKsqG51MJC3BufYPoScnHE+978Cdj5ct1gotJSi+ov3V qmHlMJL9REwLeo3aCxkBf4OmErMSP2yoJdlMwgFY= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Alexander Shishkin , Jiri Olsa , Mike Leach , Namhyung Kim , Robert Walker , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo Subject: [PATCH 29/63] perf cs-etm: Refactor enumeration cs_etm_sample_type Date: Tue, 18 Dec 2018 19:06:59 -0300 Message-Id: <20181218220733.15839-30-acme@kernel.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181218220733.15839-1-acme@kernel.org> References: <20181218220733.15839-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan The values in enumeration cs_etm_sample_type are defined with setting bit N for each packet type, this is not suggested in the usual case. This patch refactor cs_etm_sample_type by converting from bit shifting values to continuous numbers. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mike Leach Cc: Namhyung Kim Cc: Robert Walker Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1544513908-16805-5-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.19.2 diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h index b295dd2b8292..3819a04a2c27 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h @@ -23,9 +23,9 @@ struct cs_etm_buffer { }; enum cs_etm_sample_type { - CS_ETM_EMPTY = 0, - CS_ETM_RANGE = 1 << 0, - CS_ETM_TRACE_ON = 1 << 1, + CS_ETM_EMPTY, + CS_ETM_RANGE, + CS_ETM_TRACE_ON, }; enum cs_etm_isa {