From: Adrian Hunter <adrian.hunter@intel.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: linux-perf-users@vger.kernel.org, changbin.du@huawei.com
Subject: Re: [PATCH 1/2] perf, capstone: Support 32bit code under 64bit OS
Date: Thu, 29 Feb 2024 09:02:05 +0200 [thread overview]
Message-ID: <9cc8cb50-fb42-4eea-bd23-e03e9a0f9205@intel.com> (raw)
In-Reply-To: <Zd_CHC8NOW5Ig7SE@tassilo>
On 29/02/24 01:30, Andi Kleen wrote:
>>> + bool is64bit = machine__is(machine, "x86_64");
>>> + struct dso *dso;
>>> +
>>> + addr_location__init(&al);
>>> + if (thread__find_map(thread, sample->cpumode, sample->ip, &al) &&
>>> + (dso = map__dso(al.map)) != NULL &&
>>> + (dso->data.status != DSO_DATA_STATUS_ERROR)) {
>>> + map__load(al.map);
>>> + is64bit = dso->is_64_bit;
>>> + }
>>> + addr_location__exit(&al);
>>
>> Maybe 'al' could be passed down through perf_sample__fprintf_insn()
>>
>
> These are different addresses -- one is for the IP and the other is for
> the immediate. It seems cleaner to support separate ones.
They are both sample->ip
prev parent reply other threads:[~2024-02-29 7:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 23:48 [PATCH 1/2] perf, capstone: Support 32bit code under 64bit OS Andi Kleen
2024-02-27 23:48 ` [PATCH 2/2] perf, capstone: Support capstone for -F +brstackinsn Andi Kleen
2024-02-28 11:05 ` Changbin Du
2024-02-28 23:26 ` Andi Kleen
2024-02-28 11:00 ` [PATCH 1/2] perf, capstone: Support 32bit code under 64bit OS Changbin Du
2024-02-28 23:29 ` Andi Kleen
2024-02-28 11:42 ` Adrian Hunter
2024-02-28 23:30 ` Andi Kleen
2024-02-29 7:02 ` Adrian Hunter [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=9cc8cb50-fb42-4eea-bd23-e03e9a0f9205@intel.com \
--to=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=changbin.du@huawei.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 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.