docs: public static boolean loadEkstaziAgent() {
          // TODO: need to synchronize globally, as we may end up running
          // initialization multiple times, which would lead to:
          // "libattach.so already loaded in another classloader".
          try {
              // Note that this class can be loaded by different classloaders, so
              // we cannot simply use static field to check if the class has been
              // initialized.
              if (System.getProperty(AGENT_LOADER_INIT) != null) {
                  return true;
              }
              System.setProperty(AGENT_LOADER_INIT, "");
  
              URL agentJarURL = Types.extractJarURL(EkstaziAgent.class);
              return loadAgent(agentJarURL);
          } catch (Exception ex) {
              if (System.getProperty("java.version").startsWith("9")) {
                  throw new RuntimeException("Running with Java 9 requires -Djdk.attach.allowAttachSelf=true");
              }
              return false;
          }
      }