* Add support for gprofng on LoongArch
@ 2024-05-17 8:26 mengqinggang
2024-05-17 16:30 ` Vladimir Mezentsev
0 siblings, 1 reply; 3+ messages in thread
From: mengqinggang @ 2024-05-17 8:26 UTC (permalink / raw)
To: vladimir.mezentsev
Cc: binutils, Chenghua Xu, Xi Ruoyao, Fangrui Song, Jinyang He
Hi,
I am porting gprofng to LoongArch architecture.
I have some question about stack_unwind function in libcollector/unwind.c.
Is it possible to use .eh_frame section for stack unwinding?
Aarch64 stack unwind is simple because x29, x30 register saved on SP and
(SP + 8).
But x86_64 stack unwind need to walk through instructions, it looks very
complicated.
Is there any other method for stack unwind?
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Add support for gprofng on LoongArch
2024-05-17 8:26 Add support for gprofng on LoongArch mengqinggang
@ 2024-05-17 16:30 ` Vladimir Mezentsev
2024-05-20 1:28 ` mengqinggang
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Mezentsev @ 2024-05-17 16:30 UTC (permalink / raw)
To: mengqinggang; +Cc: binutils, Chenghua Xu, Xi Ruoyao, Fangrui Song, Jinyang He
On 5/17/24 01:26, mengqinggang wrote:
> Hi,
>
> I am porting gprofng to LoongArch architecture.
> I have some question about stack_unwind function in
> libcollector/unwind.c.
> Is it possible to use .eh_frame section for stack unwinding?
We can teach libcollector to read Elf and parse the .eh_frame section.
But we need to map each address to a Loadobject.
How can we do it ?
We don't have time to read /proc/self/map_files/ every time.
We have approximately 0.1 seconds for stack_unwind() and data recording
in the experiment.
-Vladimir
> Aarch64 stack unwind is simple because x29, x30 register saved on SP
> and (SP + 8).
> But x86_64 stack unwind need to walk through instructions, it looks
> very complicated.
> Is there any other method for stack unwind?
>
> Thank you.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Add support for gprofng on LoongArch
2024-05-17 16:30 ` Vladimir Mezentsev
@ 2024-05-20 1:28 ` mengqinggang
0 siblings, 0 replies; 3+ messages in thread
From: mengqinggang @ 2024-05-20 1:28 UTC (permalink / raw)
To: Vladimir Mezentsev
Cc: binutils, Chenghua Xu, Xi Ruoyao, Fangrui Song, Jinyang He
在 2024/5/18 上午12:30, Vladimir Mezentsev 写道:
>
>
> On 5/17/24 01:26, mengqinggang wrote:
>> Hi,
>>
>> I am porting gprofng to LoongArch architecture.
>> I have some question about stack_unwind function in
>> libcollector/unwind.c.
>> Is it possible to use .eh_frame section for stack unwinding?
>
> We can teach libcollector to read Elf and parse the .eh_frame section.
> But we need to map each address to a Loadobject.
> How can we do it ?
> We don't have time to read /proc/self/map_files/ every time.
> We have approximately 0.1 seconds for stack_unwind() and data
> recording in the experiment.
>
> -Vladimir
>
Thank you very much!
>
>
>
>
>> Aarch64 stack unwind is simple because x29, x30 register saved on SP
>> and (SP + 8).
>> But x86_64 stack unwind need to walk through instructions, it looks
>> very complicated.
>> Is there any other method for stack unwind?
>>
>> Thank you.
>>
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-20 1:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17 8:26 Add support for gprofng on LoongArch mengqinggang
2024-05-17 16:30 ` Vladimir Mezentsev
2024-05-20 1:28 ` mengqinggang
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 read-only IMAP folder(s) and NNTP newsgroup(s).