From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ruidong Tian <tianruidong@linux.alibaba.com>,
Leo Yan <leo.yan@linaro.org>, Al Grant <al.grant@arm.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Tor Jeremiassen <tor@ti.com>
Cc: linux-kernel@vger.kernel.org, james.clark@arm.com,
coresight@lists.linaro.org, suzuki.poulose@arm.com,
mike.leach@linaro.org, alexander.shishkin@linux.intel.com,
linux-arm-kernel@lists.infradead.org, adrian.hunter@intel.com,
linux-perf-users@vger.kernel.org, leo.yan@linaro.org
Subject: Re: [PATCH 3/3] perf scripts python: arm-cs-trace-disasm.py: do not ignore disam first sample
Date: Mon, 18 Dec 2023 17:28:26 -0300 [thread overview]
Message-ID: <ZYCraiG_hpwBg9CH@kernel.org> (raw)
In-Reply-To: <20231214123304.34087-4-tianruidong@linux.alibaba.com>
Em Thu, Dec 14, 2023 at 08:33:04PM +0800, Ruidong Tian escreveu:
> arm-cs-trace-disasm ignore disam the first branch sample, For example as
> follow, the instructions beteween 0x0000ffffae878750 and
> 0x0000ffffae878754 is lose:
Leo, Mathieu, Tor, Al, can you guys take a look and provide an Acked or
Reviewed-by tag?
Thanks,
- Arnaldo
> ARM CoreSight Trace Data Assembler Dump
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000ffffae878750 phys_addr: 0x0000000000000000 ip: 0x0000000000000000 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000000000000000 phys_addr: 0x0000000000000000 ip: 0x0000ffffae878754 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
>
> Initialize cpu_data earlier to fix it:
>
> ARM CoreSight Trace Data Assembler Dump
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000000000000000 phys_addr: 0x0000000000000000 ip: 0x0000ffffae878754 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
> 0000000000028740 <ioctl>: (base address is 0x0000ffffae850000)
> 28750: b13ffc1f cmn x0, #4095
> 28754: 54000042 b.hs 0x2875c <ioctl+0x1c>
> test 4003489/4003489 [0000] 26765.151766034 __GI___ioctl+0x14 /usr/lib64/libc-2.32.so
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000ffffa67535ac phys_addr: 0x0000000000000000 ip: 0x0000000000000000 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
>
> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
> ---
> .../scripts/python/arm-cs-trace-disasm.py | 21 ++++++++++---------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py
> index c9e14af5b58c..b1eb4293cbef 100755
> --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py
> +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py
> @@ -190,6 +190,17 @@ def process_event(param_dict):
> dso_end = get_optional(param_dict, "dso_map_end")
> symbol = get_optional(param_dict, "symbol")
>
> + cpu = sample["cpu"]
> + ip = sample["ip"]
> + addr = sample["addr"]
> +
> + # Initialize CPU data if it's empty, and directly return back
> + # if this is the first tracing event for this CPU.
> + if (cpu_data.get(str(cpu) + 'addr') == None):
> + cpu_data[str(cpu) + 'addr'] = addr
> + return
> +
> +
> if (options.verbose == True):
> print("Event type: %s" % name)
> print_sample(sample)
> @@ -211,16 +222,6 @@ def process_event(param_dict):
> if (name[0:8] != "branches"):
> return
>
> - cpu = sample["cpu"]
> - ip = sample["ip"]
> - addr = sample["addr"]
> -
> - # Initialize CPU data if it's empty, and directly return back
> - # if this is the first tracing event for this CPU.
> - if (cpu_data.get(str(cpu) + 'addr') == None):
> - cpu_data[str(cpu) + 'addr'] = addr
> - return
> -
> # The format for packet is:
> #
> # +------------+------------+------------+
> --
> 2.33.1
>
>
--
- Arnaldo
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ruidong Tian <tianruidong@linux.alibaba.com>,
Leo Yan <leo.yan@linaro.org>, Al Grant <al.grant@arm.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Tor Jeremiassen <tor@ti.com>
Cc: linux-kernel@vger.kernel.org, james.clark@arm.com,
coresight@lists.linaro.org, suzuki.poulose@arm.com,
mike.leach@linaro.org, alexander.shishkin@linux.intel.com,
linux-arm-kernel@lists.infradead.org, adrian.hunter@intel.com,
linux-perf-users@vger.kernel.org, leo.yan@linaro.org
Subject: Re: [PATCH 3/3] perf scripts python: arm-cs-trace-disasm.py: do not ignore disam first sample
Date: Mon, 18 Dec 2023 17:28:26 -0300 [thread overview]
Message-ID: <ZYCraiG_hpwBg9CH@kernel.org> (raw)
In-Reply-To: <20231214123304.34087-4-tianruidong@linux.alibaba.com>
Em Thu, Dec 14, 2023 at 08:33:04PM +0800, Ruidong Tian escreveu:
> arm-cs-trace-disasm ignore disam the first branch sample, For example as
> follow, the instructions beteween 0x0000ffffae878750 and
> 0x0000ffffae878754 is lose:
Leo, Mathieu, Tor, Al, can you guys take a look and provide an Acked or
Reviewed-by tag?
Thanks,
- Arnaldo
> ARM CoreSight Trace Data Assembler Dump
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000ffffae878750 phys_addr: 0x0000000000000000 ip: 0x0000000000000000 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000000000000000 phys_addr: 0x0000000000000000 ip: 0x0000ffffae878754 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
>
> Initialize cpu_data earlier to fix it:
>
> ARM CoreSight Trace Data Assembler Dump
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000000000000000 phys_addr: 0x0000000000000000 ip: 0x0000ffffae878754 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
> 0000000000028740 <ioctl>: (base address is 0x0000ffffae850000)
> 28750: b13ffc1f cmn x0, #4095
> 28754: 54000042 b.hs 0x2875c <ioctl+0x1c>
> test 4003489/4003489 [0000] 26765.151766034 __GI___ioctl+0x14 /usr/lib64/libc-2.32.so
> Event type: branches:uH
> Sample = { cpu: 0000 addr: 0x0000ffffa67535ac phys_addr: 0x0000000000000000 ip: 0x0000000000000000 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 }
>
> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
> ---
> .../scripts/python/arm-cs-trace-disasm.py | 21 ++++++++++---------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py
> index c9e14af5b58c..b1eb4293cbef 100755
> --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py
> +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py
> @@ -190,6 +190,17 @@ def process_event(param_dict):
> dso_end = get_optional(param_dict, "dso_map_end")
> symbol = get_optional(param_dict, "symbol")
>
> + cpu = sample["cpu"]
> + ip = sample["ip"]
> + addr = sample["addr"]
> +
> + # Initialize CPU data if it's empty, and directly return back
> + # if this is the first tracing event for this CPU.
> + if (cpu_data.get(str(cpu) + 'addr') == None):
> + cpu_data[str(cpu) + 'addr'] = addr
> + return
> +
> +
> if (options.verbose == True):
> print("Event type: %s" % name)
> print_sample(sample)
> @@ -211,16 +222,6 @@ def process_event(param_dict):
> if (name[0:8] != "branches"):
> return
>
> - cpu = sample["cpu"]
> - ip = sample["ip"]
> - addr = sample["addr"]
> -
> - # Initialize CPU data if it's empty, and directly return back
> - # if this is the first tracing event for this CPU.
> - if (cpu_data.get(str(cpu) + 'addr') == None):
> - cpu_data[str(cpu) + 'addr'] = addr
> - return
> -
> # The format for packet is:
> #
> # +------------+------------+------------+
> --
> 2.33.1
>
>
--
- Arnaldo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-12-18 20:28 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 12:33 [PATCH 0/3] perf scripts python: arm-cs-trace-disasm.py: Ruidong Tian
2023-12-14 12:33 ` Ruidong Tian
2023-12-14 12:33 ` [PATCH 1/3] perf scripts python: arm-cs-trace-disasm.py: print dso base address Ruidong Tian
2023-12-14 12:33 ` Ruidong Tian
2023-12-20 10:44 ` James Clark
2023-12-20 10:44 ` James Clark
2023-12-22 7:29 ` Ruidong Tian
2023-12-22 7:29 ` Ruidong Tian
2023-12-24 8:33 ` Leo Yan
2023-12-24 8:33 ` Leo Yan
2023-12-14 12:33 ` [PATCH 2/3] perf scripts python: arm-cs-trace-disasm.py: set start vm addr of exectable file to 0 Ruidong Tian
2023-12-14 12:33 ` Ruidong Tian
2023-12-20 12:06 ` James Clark
2023-12-20 12:06 ` James Clark
2023-12-14 12:33 ` [PATCH 3/3] perf scripts python: arm-cs-trace-disasm.py: do not ignore disam first sample Ruidong Tian
2023-12-14 12:33 ` Ruidong Tian
2023-12-18 20:28 ` Arnaldo Carvalho de Melo [this message]
2023-12-18 20:28 ` Arnaldo Carvalho de Melo
2023-12-20 11:15 ` James Clark
2023-12-20 11:15 ` James Clark
2023-12-20 17:31 ` [PATCH 0/3] perf scripts python: arm-cs-trace-disasm.py: Arnaldo Carvalho de Melo
2023-12-20 17:31 ` Arnaldo Carvalho de Melo
2024-01-10 2:56 ` [PATCH v2 0/1] perf scripts python: arm-cs-trace-disasm.py: print correct disasm info Ruidong Tian
2024-01-10 2:56 ` Ruidong Tian
2024-01-10 2:56 ` [PATCH v2 1/1] perf scripts python: arm-cs-trace-disasm.py: add option to print virtual address Ruidong Tian
2024-01-10 2:56 ` Ruidong Tian
2024-01-10 12:55 ` Leo Yan
2024-01-10 12:55 ` Leo Yan
2024-01-10 13:48 ` Ruidong Tian
2024-01-10 13:48 ` Ruidong Tian
2024-01-16 2:08 ` [PATCH v3 0/1] perf scripts python: arm-cs-trace-disasm.py: print correct disasm info Ruidong Tian
2024-01-16 2:08 ` Ruidong Tian
2024-01-16 2:08 ` [PATCH v3 1/1] perf scripts python: arm-cs-trace-disasm.py: add option to print virtual address Ruidong Tian
2024-01-16 2:08 ` Ruidong Tian
2024-01-17 10:16 ` James Clark
2024-01-17 10:16 ` James Clark
2024-01-16 2:08 ` [PATCH v3 2/3] perf scripts python: arm-cs-trace-disasm.py: set start vm addr of exectable file to 0 Ruidong Tian
2024-01-16 2:08 ` Ruidong Tian
2024-01-17 10:12 ` James Clark
2024-01-17 10:12 ` James Clark
2024-01-16 2:08 ` Ruidong Tian
2024-01-16 2:08 ` Ruidong Tian
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=ZYCraiG_hpwBg9CH@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=al.grant@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=james.clark@arm.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=tianruidong@linux.alibaba.com \
--cc=tor@ti.com \
/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.