Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3381526imu; Mon, 10 Dec 2018 00:54:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uqmbmiz6QbBQSTNlmd/NmylT8B4j7BlGf1rG2/b5axb2mOXrlDFEQS5F0HMiQNLgECqLSK X-Received: by 2002:a65:65c9:: with SMTP id y9mr10406832pgv.438.1544432085238; Mon, 10 Dec 2018 00:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544432085; cv=none; d=google.com; s=arc-20160816; b=JaxB7IWmGgYbGsmtkPu5D3iT8Oa65LGF7Np+2bjqbivuzt6nqG2xAqYaH66IkEyt0c qRZmOMX/QXUqAKvh3cfTGqI/jp8//lmSEYcwBenNcNV5A0UrOQCG4NGI6v3bLYEYx8zm I5MRGy8TJCnsdaeQcPce2UC18LgkvOIjHpMhXCdMA/LrTlIGH1xE+plWPaugUe7nAQ7u caCfQ03jgySiVyUUZXjh30vHQWgIn6Egf1bnSA70eZWZh5nnL9vkuOL57sPap7Fn1LFc 9XuNKGm3jzh7y7cAO7321iWxaJrb3bl5RE8MBDMAcWbOd0rBKF13udR4L7pHFkCmeZ3Z o8jg== 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 41si9636293plf.347.2018.12.10.00.54.30; Mon, 10 Dec 2018 00:54: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 S1726769AbeLJIxn (ORCPT + 99 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(-) 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: -- 2.7.4