From patchwork Wed Feb 6 18:48:51 2019 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: 10799921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 953E513B4 for ; Wed, 6 Feb 2019 18:53:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C84F2CA67 for ; Wed, 6 Feb 2019 18:53:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E3D42CB5B; Wed, 6 Feb 2019 18:53:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DDF832CA67 for ; Wed, 6 Feb 2019 18:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GT3JSyvS+VR1lvdJIxA4LjFWEzE2uWQxPdUS2uBvSa0=; b=d1BwhktkmRQXw+ 1JGJ4K1oscOVM0Dzs9PQcullvPoCRmpM1RgfopJ5wAGzSgR5NE0myqqRbj15f24rb2IUSWke6csck 2jiZruMsRoTMi5JtZurBZNaa5Pe2z2r7JM+yhTs+UAwlAyS3sF+ULczW+w1y+/9KqSC9yJwu+vJ/e BxOA49sqMjN6udJb0vV7IgpOPZSW/SenqJJHSnXVfHES8bsRqeDTClnDjVZZSvD0bRdnTozR6RYrr kv7r5bvoomjNa26s/butbmNKe/nVcovxjUcpE7JVRCvG5bpFOg8OftU5V5UIC+DhwbCD1Qr/pTEvy jgdXQsVopTliU2kcqL1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1grSJd-00077S-Tn; Wed, 06 Feb 2019 18:52:57 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1grSIJ-0005sW-B0 for linux-arm-kernel@bombadil.infradead.org; Wed, 06 Feb 2019 18:51:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rfRDRTD+Psk+r+kvxP7roH3oinNDjOWX5hy+p5BQTqs=; b=SSj74qm4msuK8rfCtFKsfSGTgf 1Mc6FFJtqVj00rDondLhTU3jf3+aNa97K2vg8E950rvsNVGXf+xUYaTlv/sZtkATcCDYkqxpXyNN1 YweZU2G1usW1wU0Blne+quHEDslZca5dYDhDwn5eTXPdOWYIDVF5FNpt2DyLyzeDQ0EcMtM0HOQgm nQ8z5+gOlWy4O3rcrfJGP4O/viiZkMEDcg7ghykUjQlS8I56PA3PhpL9VCg01BWEW4XQEaRBAxXVC Kl8sUMmY88QouqNIfUxPz2YQLM8CeEsVQwxbn7I1RYwPhLSpogeaVtq2avSSsTtB8jSPe0sBJQLu1 j/pEVLwA==; Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1grSIG-0005CE-QH for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2019 18:51:33 +0000 Received: from quaco.ghostprotocols.net (unknown [179.97.41.93]) (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 61112206DD; Wed, 6 Feb 2019 18:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549479090; bh=jTmWGdRh4A7qeDyLncOFpw+Bu1NzoIng5ndfrmuJASI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=esgS4MTdXkKLzBE8CCWDdW04trJLEgPcwRH3IjFy4vrxRuJYEg7EVatzmv7N65nxG u/6zGW/g0HmrOQ+of8Lq7OR7JEZcwLxKM4Rxl6kAzVnMt3Y3KsQFaNLjSmg77TNv1p H7HXHuTwh4IAxPllHivDJsDF63mdJ1JJrRmMNKNY= From: Arnaldo Carvalho de Melo To: Ingo Molnar Subject: [PATCH 41/53] perf cs-etm: Add traceID in packet Date: Wed, 6 Feb 2019 15:48:51 -0300 Message-Id: <20190206184903.24054-42-acme@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206184903.24054-1-acme@kernel.org> References: <20190206184903.24054-1-acme@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190206_135132_967806_8030EB12 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnaldo Carvalho de Melo , Mathieu Poirier , Suzuki K Poulouse , Clark Williams , coresight ml , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Alexander Shishkin , Jiri Olsa , Leo Yan , Namhyung Kim , Robert Walker , Jiri Olsa , linux-arm-kernel@lists.infradead.org, Mike Leach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Yan Add traceID in packet, thus we can use traceID to retrieve metadata pointer from traceID-metadata tuple. 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: Suzuki K Poulouse Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190129122842.32041-7-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 ++ tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 + 2 files changed, 3 insertions(+) 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 cdd38ffd10d2..ba4c623cd8de 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -295,6 +295,7 @@ static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder) decoder->packet_buffer[i].last_instr_cond = 0; decoder->packet_buffer[i].flags = 0; decoder->packet_buffer[i].exception_number = UINT32_MAX; + decoder->packet_buffer[i].trace_chan_id = UINT8_MAX; decoder->packet_buffer[i].cpu = INT_MIN; } } @@ -331,6 +332,7 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder, decoder->packet_buffer[et].last_instr_cond = 0; decoder->packet_buffer[et].flags = 0; decoder->packet_buffer[et].exception_number = UINT32_MAX; + decoder->packet_buffer[et].trace_chan_id = trace_chan_id; if (decoder->packet_count == MAX_BUFFER - 1) return OCSD_RESP_WAIT; diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h index 012b4728a46f..7e6a8850be4a 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h @@ -50,6 +50,7 @@ struct cs_etm_packet { u8 last_instr_cond; u8 last_instr_taken_branch; u8 last_instr_size; + u8 trace_chan_id; int cpu; };