From patchwork Tue Dec 11 07:38:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 153401 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp324944ljp; Mon, 10 Dec 2018 23:41:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/XGcbw+4srkFsIiLFXRNEVSx4zavGx2Gg22lA1WAYJtsiCpn0numMlBt6Fd7tpBFBiBy6r3 X-Received: by 2002:a17:902:2ac3:: with SMTP id j61mr15054208plb.185.1544514062944; Mon, 10 Dec 2018 23:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544514062; cv=none; d=google.com; s=arc-20160816; b=APj9fDFiCJ0Dv8wuox5R8bd+AzCTDSaEtXsDAst8dP635Cu5/NOrdmRcg6pdQ8rKIn /l0T0ZypfVH3JaDXjv1eVrSX3dBNsm8tYyNhzBUV+poJfZG7ITCr8mBWNDjiLYk6iqDF FY9yecUVth6Q99jETWrGAkOPaAmDFa5t8Kvg1Gcq+0xUEzn9qg92CysYoyTuPipbr4zY xt95AWmsoTT88/KQZm1ToEs8dDp+1xnhR50exZdwfjGJh7PBVsAEQeNDRKyz1YFsP714 frKraY0Kzkv5VGG/uRbaL42gm4+b6EDGifE46ex8TWm24hM0Tn3YJLVW1+YhjefhSzg7 hmQQ== 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 y20si11680556plr.106.2018.12.10.23.41.02; Mon, 10 Dec 2018 23:41:02 -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 S1726310AbeLKHlA (ORCPT + 31 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(-) -- 2.7.4 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: