public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Dmitry Dolgov" <9erthalion6@gmail.com>,
	"Namhyung Kim" <namhyung@kernel.org>
Cc: "Ian Rogers" <irogers@google.com>,
	<miguel.ojeda.sandonis@gmail.com>, <a.hindborg@kernel.org>,
	<acme@kernel.org>, <aliceryhl@google.com>,
	<bjorn3_gh@protonmail.com>, <boqun@kernel.org>, <dakr@kernel.org>,
	<gary@garyguo.net>, <linux-kernel@vger.kernel.org>,
	<linux-perf-users@vger.kernel.org>, <lossin@kernel.org>,
	<ojeda@kernel.org>, <rust-for-linux@vger.kernel.org>,
	<tmgross@umich.edu>
Subject: Re: [PATCH v1] perf test type profiling: Remote typedef on struct
Date: Tue, 14 Apr 2026 15:42:19 +0100	[thread overview]
Message-ID: <DHSYGL2DY5IU.19MOS6TI1QNOC@garyguo.net> (raw)
In-Reply-To: <wqmqx6rnqrociriliyojihkxi3llractltkfcwznzu2g5gbieb@y7eaaiee5x2o>

On Tue Mar 31, 2026 at 8:22 PM BST, Dmitry Dolgov wrote:
>> On Mon, Mar 30, 2026 at 11:42:25PM -0700, Namhyung Kim wrote:
>>
>> We have this:
>> 
>>   Dwarf_Die *die_get_real_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem)
>>   {
>>       do {
>>           vr_die = __die_get_real_type(vr_die, die_mem);
>>       } while (vr_die && dwarf_tag(vr_die) == DW_TAG_typedef);
>>  
>>       return vr_die;
>>   }
>
> Indeed, I didn't finish the analysis, fooled that the diff was solving
> the issue. Adding DW_TAG_typedef into __die_get_real_type still fixes
> the problem, but due to different reasons:
>
> * check_variable calls __die_get_real_type directly at the beginning and
>   stores the result in type_die, which is the result of the function.
>
> * if it doesn't resolve DW_TAG_typedef, the flow goes into the
>   die_get_real_type, which stores the result in the local variable
>   sized_type. But it never copied into the type_die, and never returned
>   as a result of the check_variable.
>
> Hence we either need to add DW_TAG_typedef into __die_get_real_type, or
> copy sized_type into type_die. After some testing both seems to be
> achieving the goal.

Why is the code in `check_variable` resolving typedefs itself instead of using
`die_get_real_type` instead?

Best,
Gary

  parent reply	other threads:[~2026-04-14 14:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-08 12:22 [RFC PATCH v2 0/4] Test annotate with data type profiling Dmitrii Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 1/4] tools/build: Add a feature test for rust compiler Dmitrii Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 2/4] perf test workload: Add code_with_type test workload Dmitrii Dolgov
2026-02-09 17:29   ` Ian Rogers
2026-02-11 10:57     ` Dmitry Dolgov
2026-02-09 17:33   ` Ian Rogers
2026-02-11 10:02     ` Dmitry Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 3/4] perf tests: Test annotate with data type profiling and rust Dmitrii Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 4/4] perf tests: Test annotate with data type profiling and C Dmitrii Dolgov
2026-02-10  5:39   ` Ian Rogers
2026-02-10 11:57     ` Dmitry Dolgov
2026-03-02 23:58       ` [PATCH v1] perf test type profiling: Remote typedef on struct Ian Rogers
2026-03-04 10:44         ` Dmitry Dolgov
2026-03-04 20:34           ` Arnaldo Carvalho de Melo
2026-03-29 16:18           ` Dmitry Dolgov
2026-03-31  6:42             ` Namhyung Kim
2026-03-31 19:22               ` Dmitry Dolgov
2026-04-14 14:16                 ` Dmitry Dolgov
2026-04-14 14:42                 ` Gary Guo [this message]
2026-04-14 16:08                   ` Dmitry Dolgov
2026-03-04 21:48         ` Namhyung Kim
2026-03-04 22:04           ` Arnaldo Carvalho de Melo
2026-02-08 14:39 ` [RFC PATCH v2 0/4] Test annotate with data type profiling Arnaldo Carvalho de Melo
2026-02-08 14:42   ` Rust data-type profiling working in perf was: " Arnaldo Carvalho de Melo
2026-02-08 15:16     ` Miguel Ojeda
2026-02-09  8:45     ` Dmitry Dolgov
2026-02-10  1:26       ` Namhyung Kim

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=DHSYGL2DY5IU.19MOS6TI1QNOC@garyguo.net \
    --to=gary@garyguo.net \
    --cc=9erthalion6@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=acme@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=namhyung@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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