Jump to content
Excelsior Forums
dmiles@users.sourceforge.

JC getting stuck on a single class? Did it hit a memory barier ?

Recommended Posts

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

3249 root      25   0 1881m 1.8g 2228 R 100.0 24.4  35:59.35 jc

  JC getting stuck on a single class?

2734/3303: src/java/com/cyc/cycjava/cycl/cb_gke_applet.class

2735/3303: src/java/com/cyc/cycjava/cycl/kb_utilities$$clear_forbidden_kb_covering_collections_set$ZeroArityFunction.class

2736/3303: src/java/com/cyc/cycjava/cycl/string_utilities$$not_digit_char_p$UnaryFunction.class

2737/3303: src/java/com/cyc/cycjava/cycl/rkf_text_processors$$parse_module_group_native.class

2738/3303: src/java/com/cyc/cycjava/cycl/pph_methods$$nl_generation_cache_method$UnaryFunction.class

2739/3303

It's been stuck an hour on "Compiling  src/java/com/cyc/cycjava/cycl/formula_template_utilities.class"

[root@ip-10-251-23-175 javaCyc]# ls -l src/java/com/cyc/cycjava/cycl/formula_template_utilities.class

-rw-r--r-- 1 root root 243506 May  2 07:05 src/java/com/cyc/cycjava/cycl/formula_template_utilities.class

is the size of some classes too big?

Share this post


Link to post
Share on other sites

Please send the class file to Excelsior Support Dept. (java at excelsior-usa.com) and our engineers will check the problem and return to you with a fix or workaround.

Share this post


Link to post
Share on other sites
is the size of some classes too big?

Any size that complies with the JVM specification is ok, that's not about size.

Did it hit a memory barier ?

No, it did not hit any memory barrier.

-------------

If I would say that the dependency flow graph contains lots of nested diamonds whose merge points typically encounter 50+ edges, it could not make things clear anyway, correct? ;)

Please stay tuned, we will send you a hot fix soon.

Share this post


Link to post
Share on other sites
If I would say that the dependency flow graph contains lots of nested diamonds whose merge points typically encounter 50+ edges, it could not make things clear anyway, correct?

That particular .class was machine translated LISP code so sometimes it nests some insane number of try/catch blocks to emulate local temporary Lisp symbol bindings.    Some cases a simple try/finally wasn't clear enough.   I created an Exception bubbler that was capable of throwing undeclared exceptions.  The result is bad in the case where no exception is thrown .. all finally {} code ends up duplicated.    The result is:

  try { T0...Tn } finally { F... }
  becomes 
  try { T0..Tn } catch (Throwable e) { F... rethrow e; } F...

   ///  (  n + F*2 ) ^ 2   Or some simular effect 

    Now nest a few more of these nasties back inside of both T and F..  and > 256  exit paths comes too soon.

  I couldn't quite synthesize a subroutine (well a synthetic method) w/o bringing in all outer locals into the parameters of a new method (that you'd inline anyways :))

A typical javac knows secretly the last thrown exeception created in T will stay available via env->GetLastException() as long as no one clears it. So it can move onto the F... that an outer block (which *maybe* contains a catch) will get the exception as a freebee when the inner handler misses it.  However they still have to save any exits like a return/throw. (I chose to bubble the exception instead of the return)

  Oh yeah, the dependancy graph on this monstrosity! :)    Heh, well at least your surviving on every class (except formula_template_utilities_part5) something SOOT and other optimizers can't seem to do!  (Maybe they have plausable deniablity in eventually they are constrained by limits imposed by a downstream verifier or a JVM they have no control over).  Which is something I like about JET. 

For a temporary workarround until the hotfix ..

      is accessing the method via reflectiion and hiding the

            formula_template_utilities_part5 class from JC..

Then putting it back into the runtime system's classpath afterwards (resource/)

mv src/java/com/cyc/cycjava/cycl/formula_template_utilities_part5.class  \

     resource/com/cyc/cycjava/cycl/formula_template_utilities_part5.class

       /// this stub calls thru reflection
    public static final SubLObject gather_fet_stats() {
        try {
             Class.forName("com.cyc.cycjava.cycl.formula_template_utilities_part5").
                                getMethod("gather_fet_stats_moved", new Class[0]).invoke(null, new Object[0]);
        } catch (Exception e) {
            Errors.error("gather_fet_stats_moved",e);
        }
        return NIL;
    }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×