Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp123307imu; Thu, 20 Dec 2018 18:25:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN6sELv9O7t+rd1azURqc8jWAfa4T4JPpogL0oxmDrgocUv4fLyhK430g5HztGe7q1/rYu4V X-Received: by 2002:a63:7e1a:: with SMTP id z26mr626350pgc.216.1545359155915; Thu, 20 Dec 2018 18:25:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545359155; cv=none; d=google.com; s=arc-20160816; b=O+77kIhcKO4MPROgyGUaZftVIU66tqPaiTr31Oga3jBbZg6C6jf0u3OGbupaTqPx3o xEYHw3GpJsJAszHp3D1V4F9BuUOuJ6CnB2sTqnQJR1trvBTk/8yRos+IrPfQccYFvOLc 6mKURDvsokeLaj4vbHClisI/v5zuTIIvTEK2KF9r5kq5uwDkcYlXlxA8dbcOrK4F+JoK 2IrQuobCZXeC0rQEEfv9NLFtwpuIHWOVya/psUft1qF5BAc81XC3R3f7Sn4NqHqrGG5T 7zj2B06dQDso/d8nn2gL3+XTxTiPe3y0LW+akfmG9Q4dKzz22UQI+rKwnQPj3Y2P0FVF o0TA== 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=hnzac2kKI8YgAsxb8smuzC5aMHBdiTgeF0EJolKdUgw=; b=lpKsK2J2j2tYsTdKm49zJmQDd+XRTkv78vKlV+qPw1FY8R7pRA3GlI9WrFwF07Xtuv IiPXduHAg9CQv0U/7RRKMy0/PmVTnD43xJw4UZy3sCC5fopjsX+CNXn/Rt7ZFvVm1qFY Qk4OUMv9AHFRhHXk/Ex7wc7658lnJf0IJM7dUkFasodmffVC+aWxVExxQn/G0xAsTtHx 0rhf06xziZEtHVj/oi+ZBsAnR2WPNMZGlPRPQXHKlOlpT9lwXb+q+UgvaBWqp2OJOxCP aVLlLoU3ESs/WhYf0fguRqC6whg5Ar3+eZjOJ+JALALEv5fIKyxwFjYhFOEm9Tsg3gE8 QmfQ== 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 k18si3653749pfd.241.2018.12.20.18.25.40; Thu, 20 Dec 2018 18:25:55 -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 S1731899AbeLTSP4 (ORCPT + 99 others); Thu, 20 Dec 2018 13:15:56 -0500 Received: from terminus.zytor.com ([198.137.202.136]:38093 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730338AbeLTSPz (ORCPT ); Thu, 20 Dec 2018 13:15:55 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wBKIFj8B3682950 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 20 Dec 2018 10:15:45 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wBKIFj3U3682947; Thu, 20 Dec 2018 10:15:45 -0800 Date: Thu, 20 Dec 2018 10:15:45 -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: hpa@zytor.com, namhyung@kernel.org, mike.leach@linaro.org, leo.yan@linaro.org, mathieu.poirier@linaro.org, acme@redhat.com, jolsa@redhat.com, robert.walker@arm.com, mingo@kernel.org, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, tglx@linutronix.de Reply-To: alexander.shishkin@linux.intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, namhyung@kernel.org, leo.yan@linaro.org, mathieu.poirier@linaro.org, mike.leach@linaro.org, acme@redhat.com, robert.walker@arm.com, jolsa@redhat.com, hpa@zytor.com In-Reply-To: <1544513908-16805-8-git-send-email-leo.yan@linaro.org> References: <1544513908-16805-8-git-send-email-leo.yan@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf cs-etm: Treat EO_TRACE element as trace discontinuity Git-Commit-ID: 02e7e2509e939b50f4f1b14c08b97f60256df3ea 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: 02e7e2509e939b50f4f1b14c08b97f60256df3ea Gitweb: https://git.kernel.org/tip/02e7e2509e939b50f4f1b14c08b97f60256df3ea Author: Leo Yan AuthorDate: Tue, 11 Dec 2018 15:38:27 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 18 Dec 2018 12:23:59 -0300 perf cs-etm: Treat EO_TRACE element as trace discontinuity If the decoder outputs an EO_TRACE element, it means the end of the trace buffer; this is a discontinuity and in this case the end of trace data needs to be saved. This patch generates a CS_ETM_DISCONTINUITY packet for the EO_TRACE element hereby flushing the end of trace data in cs-etm.c. 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-8-git-send-email-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bee026e76a4c..cda6f074bd03 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -409,6 +409,7 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( switch (elem->elem_type) { case OCSD_GEN_TRC_ELEM_UNKNOWN: break; + case OCSD_GEN_TRC_ELEM_EO_TRACE: case OCSD_GEN_TRC_ELEM_NO_SYNC: case OCSD_GEN_TRC_ELEM_TRACE_ON: resp = cs_etm_decoder__buffer_discontinuity(decoder, @@ -425,7 +426,6 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( decoder->packet_buffer[decoder->tail].exc_ret = true; break; case OCSD_GEN_TRC_ELEM_PE_CONTEXT: - case OCSD_GEN_TRC_ELEM_EO_TRACE: case OCSD_GEN_TRC_ELEM_ADDR_NACC: case OCSD_GEN_TRC_ELEM_TIMESTAMP: case OCSD_GEN_TRC_ELEM_CYCLE_COUNT: