Lang Hames via llvm-dev
2020-Aug-17 16:39 UTC
[llvm-dev] Get all symbols stored(?)in llvm::orc::ExecutionSession
Hi Bjoern, Did you see my previous reply? There's no way to do this currently. ORC assumes you know all the symbols,> since you added the modules defining them. > For testing / debugging you can dump the modules to stderr using > ExecutionSession::dump, but that's about it. > Do you want the symbols for diagnostic purposes, or some other reason?Regards, Lang. On Mon, Aug 17, 2020 at 5:19 AM Gaier, Bjoern via llvm-dev < llvm-dev at lists.llvm.org> wrote:> This issue is still not solved for me… > > What can I improve on my question? :o > > Adding more details or something? >_x > > Kind greetings > > Björn > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Gaier, > Bjoern via llvm-dev > *Sent:* 03 July 2020 13:51 > *To:* LLVM Developers Mailing List <llvm-dev at lists.llvm.org> > *Subject:* [llvm-dev] Get all symbols stored(?)in > llvm::orc::ExecutionSession > > > > Hey everyone, > > > > is there a way to get the name of all symbols that are stored (“stored” is > not the right term – is it?) in my current ExecutionSession? > > I know by now that you can use "lookup" to get symbols, but this requires > knowing those names. > > > > Mhh... I guess that is my shortest so far question xD Thank you in advance > for any help! > > > > Kind greetings > > Björn > > > > Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, > USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert > Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin > Cansiz. > Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, > USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert > Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin > Cansiz. > _______________________________________________ > 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/20200817/b78f4d17/attachment.html>
Gaier, Bjoern via llvm-dev
2020-Aug-18 06:16 UTC
[llvm-dev] Get all symbols stored(?)in llvm::orc::ExecutionSession
Hey Lang, Oh shoot… seems like I oversaw it… Sorry sorry sorry! (I was 5 weeks away but I thought I checked all mails correctly >o<) I think ORCs assumption is correct, currently I do extract the symbols which I care about via the modules, but when writing the code I was like “why do I have to do it like that, when the ExecutionSession already knows all symbols?” – that is where my question came from. However… I’m a bit worried about taking symbols from modules, because some of the symbols might change later when the code was compiled with the JIT. So I felt like that the ExecutionSession would been more reliable. But if I reaaaally want such a function, I could basically have a look into the dump function… Cause I think my motivation is not convincing xD Thank you Lang! Kind greetings Björn From: Lang Hames <lhames at gmail.com> Sent: 17 August 2020 18:40 To: Gaier, Bjoern <Bjoern.Gaier at horiba.com> Cc: LLVM Developers Mailing List <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Get all symbols stored(?)in llvm::orc::ExecutionSession Hi Bjoern, Did you see my previous reply? There's no way to do this currently. ORC assumes you know all the symbols, since you added the modules defining them. For testing / debugging you can dump the modules to stderr using ExecutionSession::dump, but that's about it. Do you want the symbols for diagnostic purposes, or some other reason? Regards, Lang. On Mon, Aug 17, 2020 at 5:19 AM Gaier, Bjoern via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: This issue is still not solved for me… What can I improve on my question? :o Adding more details or something? >_x Kind greetings Björn From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces at lists.llvm.org>> On Behalf Of Gaier, Bjoern via llvm-dev Sent: 03 July 2020 13:51 To: LLVM Developers Mailing List <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> Subject: [llvm-dev] Get all symbols stored(?)in llvm::orc::ExecutionSession Hey everyone, is there a way to get the name of all symbols that are stored (“stored” is not the right term – is it?) in my current ExecutionSession? I know by now that you can use "lookup" to get symbols, but this requires knowing those names. Mhh... I guess that is my shortest so far question xD Thank you in advance for any help! Kind greetings Björn Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin Cansiz. Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin Cansiz. _______________________________________________ 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 Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin Cansiz. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200818/ebd120f0/attachment.html>
Lang Hames via llvm-dev
2020-Aug-18 16:04 UTC
[llvm-dev] Get all symbols stored(?)in llvm::orc::ExecutionSession
Hi Bjoern, I’m a bit worried about taking symbols from modules, because some of the> symbols might change later when the code was compiled with the JITSymbol names shouldn't change from the moment they're added to the JIT (i.e. after being fully mangled). Consistency of symbol names is a requirement for ORC to work. You could try hooking into the orc::Platform API for this: https://github.com/llvm/llvm-project/blob/ec29538af2e0886a65f479d6a533956a1c478132/llvm/include/llvm/ExecutionEngine/Orc/Core.h#L1062 The notifyAdding method will be called for each MaterializationUnit added to the JIT, which gives you an opportunity to iterate over the symbols that it provides and record them. Regards, Lang. On Mon, Aug 17, 2020 at 11:16 PM Gaier, Bjoern <Bjoern.Gaier at horiba.com> wrote:> Hey Lang, > > > > Oh shoot… seems like I oversaw it… Sorry sorry sorry! (I was 5 weeks away > but I thought I checked all mails correctly >o<) > > > > I think ORCs assumption is correct, currently I do extract the symbols > which I care about via the modules, but when writing the code I was like > “why do I have to do it like that, when the ExecutionSession already knows > all symbols?” – that is where my question came from. > > However… I’m a bit worried about taking symbols from modules, because some > of the symbols might change later when the code was compiled with the JIT. > So I felt like that the ExecutionSession would been more reliable. > > > > But if I reaaaally want such a function, I could basically have a look > into the dump function… Cause I think my motivation is not convincing xD > > > > Thank you Lang! > > > > Kind greetings > > Björn > > > > > > *From:* Lang Hames <lhames at gmail.com> > *Sent:* 17 August 2020 18:40 > *To:* Gaier, Bjoern <Bjoern.Gaier at horiba.com> > *Cc:* LLVM Developers Mailing List <llvm-dev at lists.llvm.org> > *Subject:* Re: [llvm-dev] Get all symbols stored(?)in > llvm::orc::ExecutionSession > > > > Hi Bjoern, > > > > Did you see my previous reply? > > > > There's no way to do this currently. ORC assumes you know all the symbols, > since you added the modules defining them. > For testing / debugging you can dump the modules to stderr using > ExecutionSession::dump, but that's about it. > Do you want the symbols for diagnostic purposes, or some other reason? > > > > Regards, > > Lang. > > > > On Mon, Aug 17, 2020 at 5:19 AM Gaier, Bjoern via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > This issue is still not solved for me… > > What can I improve on my question? :o > > Adding more details or something? >_x > > Kind greetings > > Björn > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Gaier, > Bjoern via llvm-dev > *Sent:* 03 July 2020 13:51 > *To:* LLVM Developers Mailing List <llvm-dev at lists.llvm.org> > *Subject:* [llvm-dev] Get all symbols stored(?)in > llvm::orc::ExecutionSession > > > > Hey everyone, > > > > is there a way to get the name of all symbols that are stored (“stored” is > not the right term – is it?) in my current ExecutionSession? > > I know by now that you can use "lookup" to get symbols, but this requires > knowing those names. > > > > Mhh... I guess that is my shortest so far question xD Thank you in advance > for any help! > > > > Kind greetings > > Björn > > > > Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, > USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert > Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin > Cansiz. > > Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, > USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert > Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin > Cansiz. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, > USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert > Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Junichi Tajika, Ergin > Cansiz. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200818/9d269c2a/attachment.html>