Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp79854imu; Thu, 20 Dec 2018 17:22:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN4roVAAuOX1irlH03YCrgkFvYCgZblYCMGXNVF4jw6p/LbUYeYPUGf0eKUEfvypae8kQVlw X-Received: by 2002:a17:902:a9c4:: with SMTP id b4mr498604plr.298.1545355348531; Thu, 20 Dec 2018 17:22:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545355348; cv=none; d=google.com; s=arc-20160816; b=Za26b4h6fR6PuH/ads7s6yFwVFbCb/s6STSHTlgQ6BTIZ14O1pZu4mdVYNX4Ceff00 4JBmQCZ4Ok5mODYHhOwJ0KbtrZ6lR0uAq3KkkWc77TfZe8wkueo5TUMp44OaiHIa9yUa dmjoI7Cio+wc46SKpCfXveykXQBozZBS2W7/eIkYGsltpy5SW26fSK/NYr1DIF8jrlJl Fxr1g+Ge7bRUN3/FuTbs5BNdouFxbI3TDaYWdss1oVDsTO6PpNX34Zty3FapWV39pEBm lVIzWcPUdfAjcNwCZLtoqFzJcvumAvxd2nDPic/sNpB+Z12rFQrKpV0MfEPN77ZmE6Nu QFPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=K3bVwncdblSmDz5bIo+Znq/oI5x4MVzDTCplnugePww=; b=GRzD1iy8IILmY19y9beEEcpyDVNDClQbTo9bADfC1WDwJ9y5imhS7L8Gv+yn6sn0JN jzkJRXOXvydkyT/HUeTs7hVWQLznHHddSClbDHa0cPr1YPKtmCU/nzYRzTZa71JaPo4t 1n1V7pHpGAyVRnviwU0I/oPw1U6Tu7WYnJEsCAriCszYEH8cYX/fbgXDf7CbHftXDD4N nhO4c560jEALWG0qxFCWA3rxOQYKrHVvw6ZQHBvgWoZnAH+mZMxlL6b2NURV6LwJO2cy K8l3HQ3R1O/8ExbMNeNHYUu4Wb+J3up1no2fRCSSOTPSEzBMuI9L3o3BsSAYgJULgxdE 6YAw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si19559351pgl.114.2018.12.20.17.22.13; Thu, 20 Dec 2018 17:22:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387860AbeLTSOr (ORCPT + 99 others); Thu, 20 Dec 2018 13:14:47 -0500 Received: from terminus.zytor.com ([198.137.202.136]:40323 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731785AbeLTSOr (ORCPT ); Thu, 20 Dec 2018 13:14:47 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wBKIEadG3682601 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 20 Dec 2018 10:14:36 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wBKIEaIB3682598; Thu, 20 Dec 2018 10:14:36 -0800 Date: Thu, 20 Dec 2018 10:14:36 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Leo Yan Message-ID: Cc: mathieu.poirier@linaro.org, hpa@zytor.com, alexander.shishkin@linux.intel.com, mingo@kernel.org, leo.yan@linaro.org, acme@redhat.com, namhyung@kernel.org, mike.leach@linaro.org, linux-kernel@vger.kernel.org, robert.walker@arm.com, jolsa@redhat.com, tglx@linutronix.de Reply-To: mingo@kernel.org, alexander.shishkin@linux.intel.com, mathieu.poirier@linaro.org, hpa@zytor.com, acme@redhat.com, leo.yan@linaro.org, robert.walker@arm.com, mike.leach@linaro.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, tglx@linutronix.de, jolsa@redhat.com In-Reply-To: <1544513908-16805-6-git-send-email-leo.yan@linaro.org> References: <1544513908-16805-6-git-send-email-leo.yan@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf cs-etm: Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY Git-Commit-ID: 49ccf87bfb9e8517ab2f019e95845760c4c3a562 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 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 49ccf87bfb9e8517ab2f019e95845760c4c3a562 Gitweb: https://git.kernel.org/tip/49ccf87bfb9e8517ab2f019e95845760c4c3a562 Author: Leo Yan AuthorDate: Tue, 11 Dec 2018 15:38:25 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 18 Dec 2018 12:23:59 -0300 perf cs-etm: Rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY TRACE_ON element is used at the beginning of trace, it also can be appeared in the middle of trace data to indicate discontinuity; for example, it's possible to see multiple TRACE_ON elements in the trace stream if the trace is being limited by address range filtering. Furthermore, except TRACE_ON element is for discontinuity, NO_SYNC and EO_TRACE also can be used to indicate discontinuity, though they are used for different scenarios for which the trace is interrupted. This patch renames sample type CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY, firstly the new name describes more closely the purpose of the packet; secondly this is a preparation for other output elements which also cause the trace discontinuity thus they can share the same one packet type. 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-6-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 10 +++++----- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 2 +- tools/perf/util/cs-etm.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c index 97b39b1f5759..1039f364f4cc 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -390,11 +390,11 @@ cs_etm_decoder__buffer_range(struct cs_etm_decoder *decoder, } static ocsd_datapath_resp_t -cs_etm_decoder__buffer_trace_on(struct cs_etm_decoder *decoder, - const uint8_t trace_chan_id) +cs_etm_decoder__buffer_discontinuity(struct cs_etm_decoder *decoder, + const uint8_t trace_chan_id) { return cs_etm_decoder__buffer_packet(decoder, trace_chan_id, - CS_ETM_TRACE_ON); + CS_ETM_DISCONTINUITY); } static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( @@ -412,8 +412,8 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( case OCSD_GEN_TRC_ELEM_NO_SYNC: break; case OCSD_GEN_TRC_ELEM_TRACE_ON: - resp = cs_etm_decoder__buffer_trace_on(decoder, - trace_chan_id); + resp = cs_etm_decoder__buffer_discontinuity(decoder, + trace_chan_id); break; case OCSD_GEN_TRC_ELEM_INSTR_RANGE: resp = cs_etm_decoder__buffer_range(decoder, elem, 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 3819a04a2c27..a27231722e27 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h @@ -25,7 +25,7 @@ struct cs_etm_buffer { enum cs_etm_sample_type { CS_ETM_EMPTY, CS_ETM_RANGE, - CS_ETM_TRACE_ON, + CS_ETM_DISCONTINUITY, }; enum cs_etm_isa { diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index ffc4fe5c0b7e..cea3158915d3 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -562,8 +562,8 @@ static inline int cs_etm__t32_instr_size(struct cs_etm_queue *etmq, static inline u64 cs_etm__first_executed_instr(struct cs_etm_packet *packet) { - /* Returns 0 for the CS_ETM_TRACE_ON packet */ - if (packet->sample_type == CS_ETM_TRACE_ON) + /* Returns 0 for the CS_ETM_DISCONTINUITY packet */ + if (packet->sample_type == CS_ETM_DISCONTINUITY) return 0; return packet->start_addr; @@ -572,8 +572,8 @@ static inline u64 cs_etm__first_executed_instr(struct cs_etm_packet *packet) static inline u64 cs_etm__last_executed_instr(const struct cs_etm_packet *packet) { - /* Returns 0 for the CS_ETM_TRACE_ON packet */ - if (packet->sample_type == CS_ETM_TRACE_ON) + /* Returns 0 for the CS_ETM_DISCONTINUITY packet */ + if (packet->sample_type == CS_ETM_DISCONTINUITY) return 0; return packet->end_addr - packet->last_instr_size; @@ -972,7 +972,7 @@ static int cs_etm__sample(struct cs_etm_queue *etmq) bool generate_sample = false; /* Generate sample for tracing on packet */ - if (etmq->prev_packet->sample_type == CS_ETM_TRACE_ON) + if (etmq->prev_packet->sample_type == CS_ETM_DISCONTINUITY) generate_sample = true; /* Generate sample for branch taken packet */ @@ -1148,7 +1148,7 @@ static int cs_etm__run_decoder(struct cs_etm_queue *etmq) */ cs_etm__sample(etmq); break; - case CS_ETM_TRACE_ON: + case CS_ETM_DISCONTINUITY: /* * Discontinuity in trace, flush * previous branch stack