Skip to content
Snippets Groups Projects
  1. Jun 03, 2013
    • Nadav Har'El's avatar
      java.so: wait for other threads to finish · 5384f24f
      Nadav Har'El authored
      java.cc would exit right after the main() method finished. But in Java,
      this is not the correct behavior. Rather, even if main() returns, we
      need to wait for all other threads to end (or more accurately, wait
      for all threads not marked with setDaemon(true)).
      
      Calling jvm->DestroyJavaVM() does this for us, and it's probably the
      Right Thing(TM) to do anyway.
      
      Before this patch, the Jetty benchmark exited immediately after
      startup.  After this patch, its worker threads keep the whole VM running.
      5384f24f
  2. May 28, 2013
    • Nadav Har'El's avatar
      Overhaul java.so command line · 31681180
      Nadav Har'El authored
      Java.so used to correctly support the "-jar" option, but did not fully
      allow the other "mode" of running Java: specifying a class name which is
      supposed to be searched in the class path. The biggest problem was that
      it only know to find class files, but not a class inside a jar in the class
      path - even if the classpath was correctly set.
      
      Unfortunately, fixing this C code was impossible, as JNI's FindClass()
      simply doesn't know to look in Jars.
      
      So this patch overhauls java.so: Java.so now only runs a fixed class,
      /java/RunJava.class. This class, in turn, is the one that parses the
      command line arguments, sets the class path, finds the jar or class to
      run, etc.. The code is now much easier to understand, and actually works
      as expected :-) It also fixes the bug we had with SpecJVM2008's "compiler.*"
      benchmarks, which forced us to tweak the class path manually.
      
      The new code supports running a class from the classpath, and also the
      "-classpath" option to set the class path. Like the "java" command line
      tool in Linux, this one also recognizes wildcard classpaths. For example,
      to run Jetty, whose code is in a dozen jars in /jetty, one can do:
      
              run.py -e "java.so -classpath /jetty/* org.eclipse.jetty.xml.XmlConfiguration jetty.xml"
      31681180
    • Guy Zana's avatar
      788b0a8d
  3. May 27, 2013
  4. May 26, 2013
  5. May 21, 2013
  6. May 19, 2013
  7. May 18, 2013
  8. May 16, 2013
    • Nadav Har'El's avatar
      Default console to cooked mode, not raw mode. · cf74861e
      Nadav Har'El authored
      Until now, OSV's console defaulted to raw mode, to make the CLI
      happy. The problem is that on Linux, applications expect to be
      run in cooked mode, so if we ever run a simple application that
      tries to read user input, it can be confused.
      
      This patch makes OSV console default to cooked mode, and the
      CLI switch to raw mode before reading an input line - and reset
      to the default mode just before running the user's command.
      
      Unfortunately, we had to resort to adding a JNI class "Stty",
      since Java has no builtin support for the ioctls required for
      changing the tty settings.
      cf74861e
  9. May 14, 2013
  10. May 12, 2013
    • Nadav Har'El's avatar
      Some badly-written Java code - including the "serial" benchmark of · 271ede99
      Nadav Har'El authored
      SPECjvm2008, uses the Thread.getContextClassLoader() class loader
      to load classes - instead of using the current class-loader as any
      decent code does when using reflection.
      
      To allow this ugly, but officially supported, usage, we need to
      set the context class loader in RunJar.java.
      271ede99
  11. May 09, 2013
  12. May 08, 2013
  13. May 07, 2013
  14. May 01, 2013
Loading