Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4032599imu; Mon, 10 Dec 2018 11:55:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/U/J7duOUX199EtmQT++Y3CUh/iOIAnzu16HutWbW81692wVSnBRnO64gZ9hjEIK4esmihW X-Received: by 2002:a63:fe0a:: with SMTP id p10mr11843602pgh.265.1544471756459; Mon, 10 Dec 2018 11:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544471756; cv=none; d=google.com; s=arc-20160816; b=CucGVS9qICC8qaXu1kVrzE5uZK8TSeIHY0iZgxAPhZabjSuNWcl9ilv8GGnKaHNX4d HygZhLDzc+H1xvpjwN2O66FrBpNSpfL880VI0XkK9chjXK+27IPwyNj3ZtRY8oetBBJp bir24tC9Yp6+7nX9UHNlknDeXq5ORtKXh00rk97ZL21cMqnfo1leekpKPRcv/jifALYU 2ScCegCfTCIDsF/haxPasQRfXZSt/e8IXiJUmxATJVvIGi9P1VtuRvi+Wqa8h7k9sUWy +eyrJaAx8usS3XoemhK+l8OQEmWejVBK497A0AxX3A/BcoAFpUbeBpW8TpP4z57AqdDb 1Spg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uFl0eEvOtz6Xbs8l1Y5DM+iasxlKYsSMKPkIeA8sg+s=; b=KLxnw1aSBRmNWb7RQpKOTLy3YB95T+kGW23nTKQtKy3xQqhrAlpc/b51AbkuyLFAmz 1RcgZBq9mwldA9Xw9+ZoWqu0TW2d10SusrGOvHVDA2Fy8F73JkP29eJ+mN8ll7jOzgZO gltwXviJeyHgqBIHM2idQuBkutcz5vhNkhy8G+a4UdHvODollC/ik8AGizdUJjs+qyQV 3zA9VBCadziIT203mD1/SBb7tlA9TBYc4UWdztg/Hqv2P3LXXbLZbaUe55SLsg1R5KjS FZHDixooWR3Ost4G5RqVpfcY7tQw0SRPo20INY6IcD5E5t6NcIYPC5CASoNl6hmeHKGJ jSWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cJks+EjD; 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 d77si11294977pfj.124.2018.12.10.11.55.41; Mon, 10 Dec 2018 11:55:56 -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=cJks+EjD; 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 S1728882AbeLJSCK (ORCPT + 99 others); Mon, 10 Dec 2018 13:02:10 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:40027 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727515AbeLJSCK (ORCPT ); Mon, 10 Dec 2018 13:02:10 -0500 Received: by mail-io1-f65.google.com with SMTP id n9so9480094ioh.7 for ; Mon, 10 Dec 2018 10:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uFl0eEvOtz6Xbs8l1Y5DM+iasxlKYsSMKPkIeA8sg+s=; b=cJks+EjDZwnHR/7flcD7RYPJSjn8DabbWevW1W/G1M1c2bpsH0GPRjFHQBm8AskVz7 aew/ARW+9uczlmltkuzDMEFTb/fWzAXgKd21SGgVIOkHpSgV/bQ4BJbRyk5mkqyocb6v IifGCoT+fmAo/m+QBY6GyBMN8NKYSmW2Uj7ng= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uFl0eEvOtz6Xbs8l1Y5DM+iasxlKYsSMKPkIeA8sg+s=; b=FHNQUGEYZjfjtnpkKXF4ztoKwJDj2uYPk2/jNVIKZX9MAPW1WMFsOo93SxML314ob4 /s9sXA0/NGTkT6fVDqh2/k7NqMnAhPK6OD3wqAVChea1lKv2e52GUoaYBOVeYQLFDNBP 1zVblEABaFEbeWJe7tVIWaV9WQN8cIk5i3/1HiRJ3VkpqyV9XL1NcWtHHQaI/3bmWqjp q7NM8RBiR5lWYqtpxLuVKhM3Xjr4pA5ss4DimZswQd9Zq/DIicQsrQXKzjHy71qMRPyM i3X0u8feYs8aH5nsh7kBjTbKy9bJ/WDC3plFsqnBcNFaFGD0T4UZVK1yqwveuasS/7Ma lNQw== X-Gm-Message-State: AA+aEWbuCisTnlMQHFfb1cgvcx3cSXCsxXaz1ldejsOiyuJXXVwbB6bZ 3VbZlef/1cRcbRSlZ1TWP9Mw3LC5qMv3u0kXJtlbuQ== X-Received: by 2002:a5d:9602:: with SMTP id w2mr1512638iol.86.1544464927974; Mon, 10 Dec 2018 10:02:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Mathieu Poirier Date: Mon, 10 Dec 2018 11:01:55 -0700 Message-ID: Subject: Re: Coresight etmv4 enable over 32bit kernel To: adrian.wenl@gmail.com Cc: Linux Kernel Mailing List , linux-arm-kernel , leiwen@outlook.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Good day Adrian, On Sat, 8 Dec 2018 at 05:05, Lei Wen wrote: > > Hi Mathieu, > > I am enabling etmv4 coresight over one Cortex-A7 soc, using 32bit kernel. > And I am following [1] to do experiment regarding the addr_range feature. That wiki is very old and after reading it again I seriously consider removing it. It is still accurate but there are better ways to do things now, i.e perf. The main openCSD documentation page [2] contains everything you need to know about the integration with perf. [2]. https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md > The default addr_range is set as _stext~_etext, and it works fine with > etb as sink, > and etm as source. I could see there are valid kernel addresses using OpenCSD. I'm really curious about how you use openCSD to validate your traces - can you expand more on that? I think the results are misleading you since the openCSD library can't readily be used to decode sysfs trace sessions. The wiki doesn't mention using openCSD to decode traces either. The only integrated way to use openCSD to decode CoreSight traces is via perf. Again, the link above will give you all the information you need to do that. > > But while I try to store one small range of address pair, which contain only one > kernel function. It doesn't behavior like what said in [1], the write > pointer would > grows rapidly with the read pointer. And I dump the etb buffer and parse it with > openCSD, finding that there is no I_ASYNC packet in the dump and is fulled with > I_NOT_SYNC. > > So my question is why ETB continue to grow when there is no trigger at all? > Is it normal? I could provide more info if you need it. I am dubious about the validation process and as such can't comment on this. Please share your results using the perf integration and then I'll be able to have a better idea of what is going on. Taking a step back I am curious about the ETMv4/ETB combination... Is the ETB the only sink you have to work with? Moreover, are you sure it is not a TMC-ETF? The ETMv4/ETB match seems a little odd to me since they belong to two different era of the CoreSight architecture. Usually with an ETMv4 we will see a TMC-ETR, which as a lot more capabilities. Regards, Mathieu > > [1]: https://wiki.linaro.org/WorklingGroups/Kernel/Coresight/traceDecodingWithDS5 > > Thanks, > Lei