From patchwork Tue Dec 11 07:38:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 153398 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp324760ljp; Mon, 10 Dec 2018 23:40:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/Umfa92uvxiKi0YczRfcvymEJ4BKwH+kyG8RITyqTKuvAiolc5XUUUneeDv4hIJc1G2HdUo X-Received: by 2002:a63:4706:: with SMTP id u6mr12938766pga.95.1544514046950; Mon, 10 Dec 2018 23:40:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544514046; cv=none; d=google.com; s=arc-20160816; b=weNCh6zncT/28OYKOIO1XJ7ivWP6maqZ8PDvGrWhoMQUfqU5MC4ua+17ugfWpC6wNn IEnyrK/YBvUvPP9c8EPIquqEvUXQOfokFbsypLxbv5r9437o1UV6WQq9ZvHyt0J/PCzr OyCAlb49u7ubvTCb4gl7oe5o5VygrKFfm9B21+1i+BSwuVGPLdTIVNzi3snH2ocUksNE uWEfScIgSgb0RC4SsIBMueujhpkCcTMtwYOFm0bMWDcIj2T+gJ96woCfJYSb951zoEdC e6+Sag/PV/gxgpz3MOa2GppWQpo6G0FlAQgOmKKjDTv5g9eH54XsVbSI++GLzzRXl81K nLMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=7KsG51IyxvMCicfAhv+X1OucWXiA4qhwMKrH6icak5k=; b=XvJShmQq/HwTzvuk8r7jr94FAiwigakSbtSIdfK8JReDISvGVo8RYQKqeJI8JV4lAI mAuA/YFH/twdUkMYw4Azy4Z6QPKhxzck7yvPPkvW9ROG8A4BLoqO7G0KCU7eyhXEAooM bDk3MuFisbBXe+5R8bXGmUygxBi16OcA+1pHf7ZQAx2LUAbwtXyMiHFTKU2wE+i/b5b1 Jm4FEBeGzOkoukUW6/gIPQ07mn+Ds6awXBlm7MZgcm62/9rEFjqN4KNgK4WFEwi+44TF vvi7r7Y/8YDLvomlznphYbPa4OiH0xxsT2pBNHps+FjYbJ82NZldws9OmakMTJweiPSQ jflA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMxLwRDg; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h36si10843508pgm.200.2018.12.10.23.40.46; Mon, 10 Dec 2018 23:40:46 -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=@linaro.org header.s=google header.b=iMxLwRDg; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbeLKHkp (ORCPT + 31 others); Tue, 11 Dec 2018 02:40:45 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38508 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbeLKHko (ORCPT ); Tue, 11 Dec 2018 02:40:44 -0500 Received: by mail-wr1-f68.google.com with SMTP id v13so12980208wrw.5 for ; Mon, 10 Dec 2018 23:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7KsG51IyxvMCicfAhv+X1OucWXiA4qhwMKrH6icak5k=; b=iMxLwRDg3PQZUIpt3OlWqvTuEZfmbgtvhqfN8lG6OI91R7LsqBjlMjaOJlM99vkOZx 3exwV5HwXGH2rCT3nY9ZsH+wCRn4rwnfqZyO6w/n+FaUClJIikrQeQuipGq3cyDaJY4m PXc3GJxPvBDLcnD7eqIUO5uVdK3nwjoj2lRxg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7KsG51IyxvMCicfAhv+X1OucWXiA4qhwMKrH6icak5k=; b=dkRrmX9P6iYgpfMlnZdF0wXu4l+HrUnafQIlDDYrxK3vQHRYUvUXzyVCdNM0DHkRPI 6EmxZnQr8J4d6/OnrfP+UW3Cxc+QsxpWK7iP0pUiS2dQ82z75UBL1uXGiENfoVzVp7P2 ragHfaLsfrGHOY16sXdhJrJYuuRGDAYj3YcJgoxDnvowziS9JV26EhWB1VL3lUQopGiu RTaxacwL2Z3kpUpCRU4ocMafo1JQ04AW9IzhgxbM27RsDwbrfXf/3va65d6Bndr2dxDL q9V10k7gJPC2a7F2OXhcLrVthsY7cegrXsxVoZok5jE+eDr2VTX7gaGgc0n10qwICf1C FuCg== X-Gm-Message-State: AA+aEWbp+6U3xsODym8uv7AjnWXmja/HXuVjGqODj4UlhKqgeE2Xem0p oVjRLKLDxmLLIkZ+wbtvyGf0UQ== X-Received: by 2002:a5d:6988:: with SMTP id g8mr11886334wru.33.1544514042362; Mon, 10 Dec 2018 23:40:42 -0800 (PST) Received: from localhost.localdomain ([209.250.228.18]) by smtp.gmail.com with ESMTPSA id k7sm14186961wrl.51.2018.12.10.23.40.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Dec 2018 23:40:41 -0800 (PST) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Coresight ML Cc: Leo Yan , Mike Leach , Robert Walker Subject: [PATCH v3 4/8] perf cs-etm: Refactor enumeration cs_etm_sample_type Date: Tue, 11 Dec 2018 15:38:24 +0800 Message-Id: <1544513908-16805-5-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544513908-16805-1-git-send-email-leo.yan@linaro.org> References: <1544513908-16805-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Mathieu Poirier Cc: Mike Leach Cc: Robert Walker --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 Reviewed-by: Mathieu Poirier 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 b295dd2..3819a04 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 {