Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp359987imu; Mon, 10 Dec 2018 23:42:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/UrV1RcqA9+MWusndvOQfcyeYrzwdwUUfM8xh3JCXDKFaHRFletr9D6F96YqSQrlMdL7K3x X-Received: by 2002:a63:f006:: with SMTP id k6mr13660963pgh.259.1544514174257; Mon, 10 Dec 2018 23:42:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544514174; cv=none; d=google.com; s=arc-20160816; b=ec6NzCSICcW9xxbTKwv0ko4taWiWPWAYxJFqKrLFy0Ofh2SL4rnHR9hkSKVZvICuAC RXCnhzurXK83rzJRCqnT8K6jYwJm7XcilBHESG6CX88o9Nms7Ch8CkVMr1zTbKD03ywE UuNc7xWzYCdhrnob88sa3TlYRMkKcX1euQwFjAdfA8yw2RM5GzJaU5xwF95uHOGR9YM0 Ondd2YXvyQyPpsVXk3do7DUkbWoO3vRGFTLstFy3bMrHPFtDkq3Oy5xSF+BSwKAZlfhr HQr65ZdXRvLoDQWpcwDkCj1dxdM3q+0fKT8iXLqhRpdEnt3v0YFTmeHBdOJML/uxyMiq +vnQ== 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=HqaxBZzT/ny60CVvOS0lgH0CrB/BIasRrsWm7IM5vG8=; b=YaDq7ORhnaX/QagoEVV6auuvgJVSl/v/hOqw4JuVjbLDQYN6DYKNuRECP4MkFqHbGj cDSbKAQekZtu/m72tye5QXBfMGJyNEJvUKIzYvywsUggaP8kYjzUis9Q37O9rOyoAYkN WvcZE0tZQeposfeaB68Dg6fypG/7hehsf7HLHDOgBqKHgavAmv5EwkN5Kk7G0EEUWDn+ UhZiPCiAL+hpA6td3Uz/Pn1jXlMVvkj60t9W7FHyU7GqbYSW114xFoYjhwUFcEhAYCgB MSLeDtWzeHFLbCs0kPfOzNY9GZTaJ8GCz7+Wcwq/S9kiCXWMGDSyhOozeNPYW0mAOBuG kB4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cp9KUPnh; 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 c132si10973647pga.597.2018.12.10.23.42.39; Mon, 10 Dec 2018 23:42:54 -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=Cp9KUPnh; 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 S1726303AbeLKHlA (ORCPT + 99 others); Tue, 11 Dec 2018 02:41:00 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34964 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbeLKHk7 (ORCPT ); Tue, 11 Dec 2018 02:40:59 -0500 Received: by mail-wr1-f67.google.com with SMTP id 96so12986907wrb.2 for ; Mon, 10 Dec 2018 23:40:57 -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=HqaxBZzT/ny60CVvOS0lgH0CrB/BIasRrsWm7IM5vG8=; b=Cp9KUPnhAQUAo/JG52hN0Hj6I5CbvZjECAnZPG+Sf1GU+t3GohIfKw+LUziR1KXtx6 aMLkIqe1sEoANZKEduQIuphsllazBVrJpYfdlxczQEMm2Zsn64UoE/cToRV6x7AwB+6l kR96G57ANDDlB/OU0QQWA6ygrvwAkhKtdOrYs= 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=HqaxBZzT/ny60CVvOS0lgH0CrB/BIasRrsWm7IM5vG8=; b=D3XSF7r8NniSyVbJD3QISaicHtdEj5ROoMPb288vH/CyfE1EAX4teTkO/OKhaGKkN9 tqFCDxiYVK1QlmwGI/klPgnq4/9zSOVhIr6hSSEBnW6iKnby8TqEv84ZgtIubVf6+xTd 5FSAgV0jniyrhq/n/KIJD44RktEaLvGFlKJL5bvD9JCtdy5qRKWsRClPXlSZmc9LLoOT eRTX+O5LInKK4FJu1J5THWGxZf22Grk9tinzO1CSJqvjW5JsL6WMaeYr2SDZXywPRUdc xL6aNzkw34jIrGdm8QpyhPzCq0Hilbf53IIGsb6JoK2S2MOgAmxR3EuqOrulO9zz5DV2 kefA== X-Gm-Message-State: AA+aEWYgkTwsfCY5RxLq2zpZzKO5isGt1NoB6if43ArCBrfJhhU8QGG0 N3ogBADg4RAAniX53UAYaoZcbg== X-Received: by 2002:a5d:4e47:: with SMTP id r7mr12847975wrt.264.1544514056667; Mon, 10 Dec 2018 23:40:56 -0800 (PST) Received: from localhost.localdomain ([209.250.228.18]) by smtp.gmail.com with ESMTPSA id k7sm14186961wrl.51.2018.12.10.23.40.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Dec 2018 23:40:55 -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 7/8] perf cs-etm: Treat EO_TRACE element as trace discontinuity Date: Tue, 11 Dec 2018 15:38:27 +0800 Message-Id: <1544513908-16805-8-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 If decoder outputs 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 CS_ETM_DISCONTINUITY packet for EO_TRACE element hereby flushing the end of trace data in cs-etm.c. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Mike Leach Cc: Robert Walker --- 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 bee026e..cda6f07 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: -- 2.7.4