On Mon, 28 Mar 2022 11:18:36 GMT, Christian Hagedorn <chaged...@openjdk.org> 
wrote:

>> As I said before, I think it would be nice to share DWARF parser between SA 
>> and HotSpot. Can you expose these mechanisms? It may be another RFE, and may 
>> need to think other platforms.
>
>> As I said before, I think it would be nice to share DWARF parser between SA 
>> and HotSpot. Can you expose these mechanisms? It may be another RFE, and may 
>> need to think other platforms.
> 
> That would be good to have. However, I'm not familiar with the SA code and 
> how it works to share code with HotSpot. And I'm also not sure how much 
> overlap the two parsers actually have. I quickly skimmed through the DWARF 
> parsing code of the SA and it seems that its main usage is for parsing call 
> frame information (as described in section 6.4 of the DWARF 4 spec) which is 
> not supported/needed in this patch. There is still some code that could be 
> shared though like opening a DWARF file with its checks or reading an LEB 128 
> etc. Might be worth to investigate further if the two implementations can be 
> merged/reused to some extent. But I propose to file a separate RFE for that. 
> What do you think?

@chhagedorn 

> There is still some code that could be shared though like opening a DWARF 
> file with its checks or reading an LEB 128 etc. Might be worth to investigate 
> further if the two implementations can be merged/reused to some extent. But I 
> propose to file a separate RFE for that. What do you think?

Yeah, let's investigate about it in another RFE.

IMHO we can share some codes about DWARF between HotSpot and SA, and also we 
might need DWARF-based call frame parser in HotSpot because some 3rd-party 
native libraries don't use base pointer (RBP) to store SP due to optimization. 
In SA side, it would be useful if we can check native source file and line 
number in mixed jstack with your change.

So I want to unify DWARF parser (processor) between HotSpot and SA, but it 
might be long journey... thus I agree with you to file it as another RFE.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7126

Reply via email to