[llvm-dev] How to read stack map

Philip Reames via llvm-dev llvm-dev at lists.llvm.org
Wed May 12 11:37:15 PDT 2021


Kavindu,

I can't parse your question.  Can you rephrase?

Philip

On 5/12/21 11:33 AM, Kavindu Gimhan Zoysa via llvm-dev wrote:
> What should I do, if I want to read the stack map within the same 
> program where the stack map is generated? I think an ELF-reading 
> library should be used externally.
>
> Can't I use this C API `LLVMCreateSimpleMCJITMemoryManager()`?
This is almost certainly unrelated to your question if I'm even vaguely 
understanding you.
>
> Kavindu Gimhan Zoysa,
> BSc(Hons) | ENTC | UoM,
> SSE | WSO2
>
> GitHub <https://github.com/KavinduZoysa> LinkedIn 
> <https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/> Medium 
> <https://medium.com/@kavindugimhanzoysa>
>
>
> On Wed, 12 May 2021 at 18:37, Denis Antrushin via llvm-dev 
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
>     LLVM puts stack map into special section, see
>     https://llvm.org/docs/StackMaps.html#stackmap-section
>     <https://llvm.org/docs/StackMaps.html#stackmap-section>
>     You can use any ELF-reading library to extract/read it
>
>     On 12.05.2021 10:15, Kavindu Gimhan Zoysa via llvm-dev wrote:
>     > Hi all,
>     >
>     > I was able to generate the Stack Map which is shown here
>     https://llvm.org/docs/StackMaps.html#stack-map-format
>     <https://llvm.org/docs/StackMaps.html#stack-map-format>
>     <https://llvm.org/docs/StackMaps.html#stack-map-format
>     <https://llvm.org/docs/StackMaps.html#stack-map-format>>. Now I
>     want to read those entries. What I did was, I manually change the
>     .s file as shown below (Added the *.globl __LLVM_StackMaps
>     *manually). Then I can read the entries using C code.
>     >
>     > .globl __LLVM_StackMaps
>     > __LLVM_StackMaps:
>     > .byte 3
>     > .byte 0
>     > .short 0
>     >
>     > I want to know, whether this is the correct approach. If not
>     could you please suggest me the correct approach?
>     >
>     > Really appreciate your input on this.
>     >
>     > Thank you,
>     > Kavindu
>     >
>     > Kavindu Gimhan Zoysa,
>     > BSc(Hons) | ENTC | UoM,
>     > SSE | WSO2
>     >
>     > GitHub <https://github.com/KavinduZoysa
>     <https://github.com/KavinduZoysa>> LinkedIn
>     <https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/
>     <https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/>>
>     Medium <https://medium.com/@kavindugimhanzoysa
>     <https://medium.com/@kavindugimhanzoysa>>
>     >
>     > _______________________________________________
>     > LLVM Developers mailing list
>     > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>     > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>     <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
>     >
>     _______________________________________________
>     LLVM Developers mailing list
>     llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>     https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>     <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210512/74d7cfc1/attachment-0001.html>


More information about the llvm-dev mailing list