From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v6 1/3] perf, capstone: Support 32bit code under 64bit OS
Date: Fri, 5 Apr 2024 10:46:21 -0300 [thread overview]
Message-ID: <ZhAArR7BsaFhoi61@x1> (raw)
In-Reply-To: <3b60c8dd-32fe-4dfb-a78f-8596b3ef4410@intel.com>
On Thu, Apr 04, 2024 at 09:22:11AM +0300, Adrian Hunter wrote:
> On 2/04/24 00:08, Andi Kleen wrote:
> > Use the DSO to resolve whether an IP is 32bit or 64bit and use that to
> > configure capstone to the correct mode. This allows to correctly
> > disassemble 32bit code under a 64bit OS.
> >
> > % cat > loop.c
> > volatile int var;
> > int main(void)
> > {
> > int i;
> > for (i = 0; i < 100000; i++)
> > var++;
> > }
> > % gcc -m32 -o loop loop.c
> > % perf record -e cycles:u ./loop
> > % perf script -F +disasm
> > loop 82665 1833176.618023: 1 cycles:u: f7eed500 _start+0x0 (/usr/lib/ld-linux.so.2) movl %esp, %eax
> > loop 82665 1833176.618029: 1 cycles:u: f7eed500 _start+0x0 (/usr/lib/ld-linux.so.2) movl %esp, %eax
> > loop 82665 1833176.618031: 7 cycles:u: f7eed500 _start+0x0 (/usr/lib/ld-linux.so.2) movl %esp, %eax
> > loop 82665 1833176.618034: 91 cycles:u: f7eed500 _start+0x0 (/usr/lib/ld-linux.so.2) movl %esp, %eax
> > loop 82665 1833176.618036: 1242 cycles:u: f7eed500 _start+0x0 (/usr/lib/ld-linux.so.2) movl %esp, %eax
> >
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
>
> As with V4, comma in subject is slightly odd, otherwise:
>
> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
>
> Also note V4 Ack from Thomas Richter:
>
> https://lore.kernel.org/all/5399c3b2-a1f0-41c6-ba91-a6a6692629dd@linux.ibm.com/
Collected Thomas for 1/3 and standardized the summary lines, thanks:
⬢[acme@toolbox perf-tools-next]$ git log --oneline -3
0209991d98e483af (HEAD -> perf-tools-next) perf script: Consolidate capstone print functions
d812044688dfe73e perf script: Add capstone support for '-F +brstackdisasm'
38ab60132b0d477e perf script: Support 32bit code under 64bit OS with capstone
⬢[acme@toolbox perf-tools-next]$
- Arnaldo
next prev parent reply other threads:[~2024-04-05 13:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 21:08 Updated capstone fixes Andi Kleen
2024-04-01 21:08 ` [PATCH v6 1/3] perf, capstone: Support 32bit code under 64bit OS Andi Kleen
2024-04-04 6:22 ` Adrian Hunter
2024-04-05 13:46 ` Arnaldo Carvalho de Melo [this message]
2024-04-01 21:08 ` [PATCH v6 2/3] perf, script, capstone: Add support for -F +brstackdisasm Andi Kleen
2024-04-04 6:23 ` Adrian Hunter
2024-04-01 21:08 ` [PATCH v6 3/3] perf script: Consolidate capstone print functions Andi Kleen
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=ZhAArR7BsaFhoi61@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=linux-perf-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).