From patchwork Tue Dec 18 22:07:02 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: 154219 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4236586ljp; Tue, 18 Dec 2018 14:11:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/VOVLqDCoNmlTROm8AQVbBmXYiB+7wVuqY2+o62y+qV2q8vnMek6n44ZU2ejYud0Bwt8fYW X-Received: by 2002:a63:4b25:: with SMTP id y37mr17775233pga.181.1545171098160; Tue, 18 Dec 2018 14:11:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545171098; cv=none; d=google.com; s=arc-20160816; b=ZY1v9zOpG3m5yK9VjftvNY3npZH3B9l5Bwm7S5HyaawKwP9I6hrKct61ypKIFO/UmQ GRAf3fNZqlRSlW8mZsEBztvOEfXCOg38ywkEGuQuUsGhQJTiQYMffGYLbMv2lT4OG3Yn NxpjloQjUX0fcfQ3/TJSdfdShhChOg8U2mOvxhMQsfMJRYM6RiCaVs5ePeD+TSUbHazR 7exPJpagVcg0GOXVhJN+bdvhPb91YQhf4bre42mvKgm4E7Nj+UnpB0uL6TLnm2GAXLkc gnMSlzLSagMCB/eFbd4IAFpLjx19OAPKUOwmus7MPtn+Vp2GmU/dLR/Mmis9dio6fHH5 aQYQ== 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=ZIMkACEk0QqztaJlm1Ltc93dhV7jNz2Fdlrj1L88kRg=; b=GtPHAk2IPGmZGoGSHqn+S2k+PCTI/vOW3Uxow6Yu4A0eGmmQ8dXrQ5xZz10xftIs+R NMAFODndGT+VpS/AzOXy4J7QWj5n7Qqc0xoWQhADUMqEPxwOW9+fEoeUTHIqpYfWCNmO 4ZFOpNtLB+Cb429JbE7H2KYR1A5Slx43PvITCbzLSsRRkZrgqemF3XEaiqFFJJIWPslQ V1D5rdu4kK9JVFUl9LLpEziZbDeha7L1lDxHxU1sh5XIU5xghM6U8Hm6wjwpLHMk9G+Y yDokjJJHdmjr9hjHYjuA7m5F70iWuNw94FZk93nbxPEWAyvvem5+v/Cne1P/fTmx2znz m2TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="q/QghDp+"; 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 p17si14789986pfk.275.2018.12.18.14.11.37; Tue, 18 Dec 2018 14:11:38 -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="q/QghDp+"; 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 S1727887AbeLRWLg (ORCPT + 31 others); Tue, 18 Dec 2018 17:11:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:40404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727333AbeLRWLe (ORCPT ); Tue, 18 Dec 2018 17:11:34 -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 14C0F218A6; Tue, 18 Dec 2018 22:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545171093; bh=jhSBn0ktjs5nfkohDzrY5E51WcER3XfbFamcIWq8zJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/QghDp+SsPnitLST9SyX55nVn4KweOLGZnoOEFkKO3a7/dWu8s5p80bAj3cH9Nuh MqLKH4saoc2sJLj+3yNoHUaqwOlPBii4D4bnFPPMzS2j5LrkVu4hF6HgyuswD6eAlg xeXzod75d8rKw+ooK5sOmjEBD7WuMmmuvxZCqnZU= 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 32/63] perf cs-etm: Treat EO_TRACE element as trace discontinuity Date: Tue, 18 Dec 2018 19:07:02 -0300 Message-Id: <20181218220733.15839-33-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 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(-) -- 2.19.2 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: