All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Linu Cherian <linuc.decode@gmail.com>
Cc: linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Coresight ML <coresight@lists.linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Linu Cherian <lcherian@marvell.com>,
	Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH v4 0/2] Make sysFS functional on topologies with per core sink
Date: Thu, 12 Nov 2020 09:20:33 +0000	[thread overview]
Message-ID: <e628bae0-00b3-fc0f-4247-a9748844f5da@arm.com> (raw)
In-Reply-To: <CAAHhmWjTUO_qDi-i2VORVsKt+h8Q+wEB7c0gcShi9RdxJx0CWA@mail.gmail.com>

On 11/12/20 8:57 AM, Linu Cherian wrote:
> Hi Suzuki,
> 
> On Tue, Nov 10, 2020 at 8:27 PM Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>>
>> Hi Linu
>>
>> On 11/10/20 12:57 PM, Linu Cherian wrote:
>>> Hi Suzuki,
>>>
>> ...
>>

....

>>> # ./perf report
>>> 0x368 [0x50]: failed to process type: 1 [Cannot allocate memory]
>>> Error:
>>> failed to process sample
>>
>> I have no clue about it. Are you able to run it under GDB ? (Looks like
>> you have built the perf, so if you have sources, it may be a good idea
>> to run under the GDB and figure out where that error is coming from).
>>
> 
> Yeah gdb helped figuring out the issue.
> The issue is in the opencsd, where it doesn't seem to support multiple streams
> when the formatter is not enabled. .
> Note:Our Silicon has formatter disabled and we already had changes in perf tool
> to take care of the formatter status.
> 
> The below hack helped.
> 
> diff --git a/decoder/source/ocsd_dcd_tree.cpp b/decoder/source/ocsd_dcd_tree.cpp
> index be15e36..0210dec 100644
> --- a/decoder/source/ocsd_dcd_tree.cpp
> +++ b/decoder/source/ocsd_dcd_tree.cpp
> @@ -401,7 +401,7 @@ ocsd_err_t DecodeTree::createDecoder(const
> std::string &decoderName, const int c
>       int crtFlags = createFlags;
> 
>       uint8_t CSID = 0;   // default for single stream decoder (no
> deformatter) - we ignore the ID
> -    if(usingFormatter())
> +    //if(usingFormatter())
>       {
>           CSID = pConfig->getTraceID();
>           crtFlags |= OCSD_CREATE_FLG_INST_ID;
> 
> 
> Not sure if this is the right fix though.

That may work for you, but would break the existing platforms
and the drivers which enable formatting by default.
We need a way to address this in the perf side. This would be
needed for the ETE/TRBE trace scenario as well, where
the formatting is not supported by TRBE.

> 
> This is how i tested,
> 
> 1. # taskset 0x2 ./perf record -e cs_etm//u -F 10 --per-thread ping -c
> 30 127.0.0.1
> 
> 2. # Ctrl-Z // Put the process in background
> 
> 3. # taskset -p 0x4 <pid of ping process> // Move the ping process to core 2
> 
> 4. # fg // Get the process to foreground
> 
> 5. ./perf report
> snip ...
> 
> # Samples: 66K of event 'branches:uH'
> # Event count (approx.): 66953
> #
> # Children      Self  Command  Shared Object          Symbol
> # ........  ........  .......  .....................
> ........................................
> #
>      15.94%    15.94%  ping     ld-2.31.so             [.] _dl_lookup_symbol_x
>      14.93%    14.93%  ping     ld-2.31.so             [.] do_lookup_x
>      10.68%    10.68%  ping     libc-2.31.so           [.] _dl_addr
>       9.87%     9.87%  ping     ld-2.31.so             [.] _dl_relocate_object
>       6.75%     6.75%  ping     ld-2.31.so             [.] strcmp
>       3.62%     3.62%  ping     ld-2.31.so             [.] check_match
>       2.72%     2.72%  ping     libc-2.31.so           [.] __vfprintf_internal
>       1.90%     1.90%  ping     libc-2.31.so           [.] _int_malloc
>       1.29%     1.29%  ping     libc-2.31.so           [.] getenv
>       1.28%     1.28%  ping     libc-2.31.so           [.] strcmp
>       1.17%     1.17%  ping     libc-2.31.so           [.]
> _IO_file_xsputn@@GLIBC_2.17
>       1.16%     1.16%  ping     ld-2.31.so             [.] _dl_name_match_p
> 
> snip ...
> 
> Also i could verify using prints in the tmc-etr-driver that the trace
> buffer gets reused across cores
> as well.

Cool ! So please could you test the newer version of this patch (not functionally
different, but slightly modified code) and add a Tested-by if you are happy
with it ?

https://lore.kernel.org/linux-arm-kernel/1605012309-24812-3-git-send-email-anshuman.khandual@arm.com/

Cheers
Suzuki



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2020-11-12  9:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04  2:41 [PATCH v4 0/2] Make sysFS functional on topologies with per core sink Linu Cherian
2020-09-04  2:41 ` [PATCH v4 1/2] coresight: etm: perf: Sink selection using sysfs is deprecated Linu Cherian
2020-09-04  2:41 ` [PATCH v4 2/2] coresight: Make sysFS functional on topologies with per core sink Linu Cherian
2020-09-14 19:36   ` Mathieu Poirier
2020-09-15  4:40     ` Linu Cherian
2020-10-05 11:27 ` [PATCH v4 0/2] " Suzuki K Poulose
2020-10-06 13:21   ` Linu Cherian
2020-10-06 16:12   ` Mathieu Poirier
2020-10-06 16:43     ` Suzuki K Poulose
2020-10-06 16:56       ` Mathieu Poirier
2020-10-26  4:33   ` Linu Cherian
2020-10-26 18:17     ` Suzuki K Poulose
2020-10-27 13:13       ` Linu Cherian
2020-11-07  5:43         ` Linu Cherian
2020-11-10 12:57           ` Linu Cherian
2020-11-10 14:57             ` Suzuki K Poulose
2020-11-12  8:57               ` Linu Cherian
2020-11-12  9:20                 ` Suzuki K Poulose [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e628bae0-00b3-fc0f-4247-a9748844f5da@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=coresight@lists.linaro.org \
    --cc=lcherian@marvell.com \
    --cc=linuc.decode@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.