Is there an explanation anywhere of what code that uses a stack map looks like? I'm interested in writing a garbage collector, but it's not clear to me how my code should make use of the stack map format to actually locate roots in memory. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180113/a6b79e01/attachment.html>
> Is there an explanation anywhere of what code that uses a stack map looks > like? I'm interested in writing a garbage collector, but it's not clear to > me how my code should make use of the stack map format to actually locate > roots in memory. >Quoted from [1], The intrinsics documented here are currently used by the JavaScript compiler within the open source WebKit project, see the FTL JIT, but they are designed to be used whenever stack maps or code patching are needed. Maybe you can look FTL JIT for example? [1] https://llvm.org/docs/StackMaps.html HTH, chenwj -- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180114/7511df4c/attachment.html>
Hi, I implemented a garbage collector for a language I wrote in college using the llvm gc statepoint infrastructure. Information for statepoints: https://llvm.org/docs/Statepoints.html Example usage of parsing the llvm stackmap can be found at: https://github.com/dotnet/llilc/blob/master/lib/GcInfo/GcInfo.cpp https://llvm.org/docs/StackMaps.html#stackmap-format https://github.com/llvm-mirror/llvm/blob/4604874612fa292ab4c49f96aedefdf8be1ff27e/include/llvm/Object/StackMapParser.h Thanks, River Riddle On Sat, Jan 13, 2018 at 10:02 AM, benzrf via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Is there an explanation anywhere of what code that uses a stack map looks > like? I'm interested in writing a garbage collector, but it's not clear to > me how my code should make use of the stack map format to actually locate > roots in memory. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://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/20180113/1cfd727e/attachment.html>
p.s. the stackmap format is intended to be transcoded into whatever internal format you might want. It's not expected to be a long lived data structure. Given that, the format prioritizes simplicity over size and efficiency of access. The format itself is documented here: https://llvm.org/docs/StackMaps.html#stack-map-format On 01/13/2018 05:48 PM, River Riddle via llvm-dev wrote:> Hi, > I implemented a garbage collector for a language I wrote in college > using the llvm gc statepoint infrastructure. > > Information for statepoints: > https://llvm.org/docs/Statepoints.html > > Example usage of parsing the llvm stackmap can be found at: > https://github.com/dotnet/llilc/blob/master/lib/GcInfo/GcInfo.cpp > https://llvm.org/docs/StackMaps.html#stackmap-format > https://github.com/llvm-mirror/llvm/blob/4604874612fa292ab4c49f96aedefdf8be1ff27e/include/llvm/Object/StackMapParser.h > > Thanks, > River Riddle > > > On Sat, Jan 13, 2018 at 10:02 AM, benzrf via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > Is there an explanation anywhere of what code that uses a stack > map looks like? I'm interested in writing a garbage collector, but > it's not clear to me how my code should make use of the stack map > format to actually locate roots in memory. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://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/20180116/8ed8a063/attachment.html>