From patchwork Mon Dec 10 08:53:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 153248 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3327423ljp; Mon, 10 Dec 2018 00:53:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/XSlWMbADxwy5FMtAs3Ji7WjtglnScO9mpMv0QnmnCahbQky4+3IGGnwSSqA+rEkzB/Z1/e X-Received: by 2002:a63:2bc4:: with SMTP id r187mr10057319pgr.306.1544432025275; Mon, 10 Dec 2018 00:53:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544432025; cv=none; d=google.com; s=arc-20160816; b=bOyp8DVYXPaC3dlmYJIUdLgO3VUlMZfBkkAhACcX1Ds9hnhCAtkUjonelzJteREVFc N21/qG70gcc2yByYo2yDlkdP2WdBPMbniQDmP8sLG6Et+df2lACzYz4zeJpmXnjwSX4d WlDD6MrJERHr/M6sNm9UeAlK2ngSfgpa8dsSYWfDucL0D/9CAfbuxIKCGILwk/Q/jaDT hnUshPZ5XTcC4siGfBu/Vfne68izXIXCEFXIV1rkueGrydJtEnf4+6havTMpdIbPx1/1 id78uil3hZo3y5T693OyIvz1gTx+ETZk1Dg6eloO1lNJl/LbNH6OgMq4laCMjzkx2a3A y8Fw== 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=vUyooLcyJUYiK6jffhRtzW6QvVrGY41s8t/va8y//+E=; b=o/onUEbncKktkGnaS8cGDYBXHzGQx04owayyG+H2wkgduUQHL78rpi7zsGQrLtsnB/ uZC/AZSri+UscrGgmzyMTQjTF8A7hA78NUoWF/z4PArJEwAC8lsmOHss1vqg+Vvu5VqG VL9zzHAuWNZG+2psFJrvQ1Ld707/dia/YsWGI4XVFFCva0G1/bu9Ph3m3f3U7NeHPzuP OULHRzbWcYERvuMc/BQSmOwIsQ0Am2o02L+1uX/Es9MzjbWulL78yc7x6rBdJKPlRb24 3w4B8O/tjTkoK2YT6SusV4KjeRsGtynZ6oBv4/TG/JKUSp0JblFdkc7Td+bLe75sK6zb zbrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P83Jx93Q; 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 a1si9324340pgk.495.2018.12.10.00.53.44; Mon, 10 Dec 2018 00:53:45 -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=P83Jx93Q; 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 S1726777AbeLJIxn (ORCPT + 31 others); Mon, 10 Dec 2018 03:53:43 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:46040 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726754AbeLJIxm (ORCPT ); Mon, 10 Dec 2018 03:53:42 -0500 Received: by mail-wr1-f47.google.com with SMTP id b14so9527587wru.12 for ; Mon, 10 Dec 2018 00:53:41 -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=vUyooLcyJUYiK6jffhRtzW6QvVrGY41s8t/va8y//+E=; b=P83Jx93Qf7l7qBaSRaK1K3yR6IZ6RtW2bu5lW7VjGrBx2KuWrCUeSsAe+V50Mc8w95 fhfDgA24iPzUWSoJgyngux5eN41dgd+rs2+8ZriiBvbRa/m7z8eYzxa0QirGPZ5i2EHg rKZ4jbQe2VFiiOxqjde3BE6J4nMBy+j6pXJ4g= 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=vUyooLcyJUYiK6jffhRtzW6QvVrGY41s8t/va8y//+E=; b=odwhZ60NNh5+m4X6avvbBwhs4RCoGSgjj8s766FsQIYIb/FkzHWUe/ewKESoqyQ81z H2tiaUAmARmRyXgQqZWtpo8dmM+2BcdJKirokRb3NbL8QKRwA6uq0J5/e6cXqEVHI3qM AXymu5VTLPyKqqDUNGlAyeUNOB/6acTJJEstZYIGrLtIygk5X5x1EAmkk0SOZRMWYOec DwkuCj/cyfzMQo0gHO7xsyFVkqe5AEyoCrL4v+acmLTSCnw8yPxGfQlgDN7Kucd1Ax5/ i86xtmO9fi9+3ZKwMlE2SIgCJA/x9VCVzGpvcuhxkjjr0jt1jShFXJXXS62i6gKPF8wC rdJg== X-Gm-Message-State: AA+aEWbQTgn9ej19Zhv/QJxWMWT5OA0tIUoVmHu96yIDiqBsS1Smbg/T mw6zD0RjPgOvCguxcLGsfi4SGQ== X-Received: by 2002:adf:dfd1:: with SMTP id q17mr9543064wrn.27.1544432020389; Mon, 10 Dec 2018 00:53:40 -0800 (PST) Received: from localhost.localdomain ([209.250.228.18]) by smtp.gmail.com with ESMTPSA id m4sm9097351wml.2.2018.12.10.00.53.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Dec 2018 00:53:39 -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 v2 5/6] perf cs-etm: Treat EO_TRACE element as trace discontinuity Date: Mon, 10 Dec 2018 16:53:00 +0800 Message-Id: <1544431981-24144-6-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544431981-24144-1-git-send-email-leo.yan@linaro.org> References: <1544431981-24144-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. Cc: Mathieu Poirier Cc: Mike Leach Cc: Robert Walker Signed-off-by: Leo Yan --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 Reviewed-by: Mathieu Poirier 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 46b67f1..bcb5c98 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -411,6 +411,7 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( case OCSD_GEN_TRC_ELEM_UNKNOWN: break; case OCSD_GEN_TRC_ELEM_NO_SYNC: + case OCSD_GEN_TRC_ELEM_EO_TRACE: resp = cs_etm_decoder__buffer_discontinuity(decoder, trace_chan_id); decoder->trace_on = false; @@ -431,7 +432,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: