Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp359486imu; Mon, 10 Dec 2018 23:42:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/XoVrGZG0sL/KmlzUmwSRaDNgKxi4YXSdJ9buzqPslObeIM8tbb7+yGFSUympvK2hMDFsVd X-Received: by 2002:a63:1b48:: with SMTP id b8mr13742910pgm.187.1544514134914; Mon, 10 Dec 2018 23:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544514134; cv=none; d=google.com; s=arc-20160816; b=0LPTHvjix9B7MgC77dWObAaF55vzZdqA6z72mcswTu4nUDr8WRSaKUyYvPI75vM8cA mCLXFjvWsVM2xhf8Qp8OXX6J0JIvcAURf59qwua2CZRHbSRC7kayK5XGTjupOQVM0BiW 8cVpuP0Nu+31IQzJOpz8hR88dey1bETpdbuR0dh1KPo8p7Rl6UE9uBfCB8VsC3R0hzgt dqbP4Ef8GBBbDqY2nCGtCIJSTqk7igQO0GDxptkqf3vmnQ/20MbbZr5U93UpVftGzuqu Adm/YH06z7JGlRvvzaLOWJsc8TxSFhB5WzY2lfMkkaq1ZVpzsAku6YNSOJ9ng0fLSp3s 0ZPA== 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 f10si10726256pgo.356.2018.12.10.23.41.48; Mon, 10 Dec 2018 23:42:14 -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 S1726258AbeLKHko (ORCPT + 99 others); Tue, 11 Dec 2018 02:40:44 -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(-) 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 { -- 2.7.4