<div dir="ltr">Hi Sanne, thanks for reporting this. It looks like a bug. It can be fixed by enclosing the relevant code under the "INCLUDE_JVMTI" macro.<div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Ashutosh Mehra</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 8, 2024 at 9:58 AM Sanne Grinovero <<a href="mailto:sanne@redhat.com">sanne@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>I'm experimenting building Leyden locally with non-default configurations, with the intent of comparing its potential as an alternative to GraalVM native-images, and one of my goals would be to produce a minimal JVM build which exclusively includes the components that our applications are going to need at runtime.</div><div><br></div><div>This implies being very selective with the JVM features I choose at configuration time; I've already opened some minor issues identified during such experiments.</div><div><br></div><div>Today I noticed today that if I exclude the "jvmti" feature, the premain branch of Leyden doesn't compile:</div><div><br></div><div><br></div><div><div>=== Output from failing command(s) repeated here ===<br>* For target hotspot_variant-custom_libjvm_objs_SCCache.o:<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp: In member function ‘void SCAddressTable::init_opto()’:<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3815:39: error: ‘notify_jvmti_vthread_start’ is not a member of ‘OptoRuntime’<br> 3815 | SET_ADDRESS(_C2_blobs, OptoRuntime::notify_jvmti_vthread_start());<br> | ^~~~~~~~~~~~~~~~~~~~~~~~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3511:47: note: in definition of macro ‘SET_ADDRESS’<br> 3511 | type##_addr[type##_length++] = (address) (addr); \<br> | ^~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3816:39: error: ‘notify_jvmti_vthread_end’ is not a member of ‘OptoRuntime’<br> 3816 | SET_ADDRESS(_C2_blobs, OptoRuntime::notify_jvmti_vthread_end());<br> | ^~~~~~~~~~~~~~~~~~~~~~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3511:47: note: in definition of macro ‘SET_ADDRESS’<br> 3511 | type##_addr[type##_length++] = (address) (addr); \<br> | ^~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3817:39: error: ‘notify_jvmti_vthread_mount’ is not a member of ‘OptoRuntime’<br> 3817 | SET_ADDRESS(_C2_blobs, OptoRuntime::notify_jvmti_vthread_mount());<br> | ^~~~~~~~~~~~~~~~~~~~~~~~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3511:47: note: in definition of macro ‘SET_ADDRESS’<br> 3511 | type##_addr[type##_length++] = (address) (addr); \<br> | ^~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3818:39: error: ‘notify_jvmti_vthread_unmount’ is not a member of ‘OptoRuntime’<br> 3818 | SET_ADDRESS(_C2_blobs, OptoRuntime::notify_jvmti_vthread_unmount());<br> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>/home/sanne/sources/leyden/src/hotspot/share/code/SCCache.cpp:3511:47: note: in definition of macro ‘SET_ADDRESS’<br> 3511 | type##_addr[type##_length++] = (address) (addr); \<br> | ^~~~<br> ... (rest of output omitted)</div><div><br></div><div>I'm wondering if I should open an issue for this case? I appreciate it's early days and that such aspects might not be a priority currently!</div><div><br></div><div>Thanks,</div><div>Sanne<br><br></div></div></div>
</blockquote></div>