gc overhead limit exceeded

63 views
Skip to first unread message

haolinl...@gmail.com

unread,
Apr 7, 2016, 10:05:52 AM4/7/16
to antlr-discussion
Using the grammar for java 8 given in the antlr grammar library, trying to lex, parse and generate a parse tree of a java program with about 1k lines of code or more 
breaks my GC. Ive uploaded a screen shot of the error message i get.  I also sometimes get out of memory error, although i increase the heap space of the GC.

Would anyone know any solution or where the problem originates from? 


Screen Shot 2016-03-29 at 23.19.46.png
Screen Shot 2016-04-07 at 15.04.28.png

Eric Vergnaud

unread,
Apr 7, 2016, 8:35:22 PM4/7/16
to antlr-discussion
Maybe not enough memory allocated to the java process?

Jim Idle

unread,
Apr 7, 2016, 9:50:35 PM4/7/16
to antlr-di...@googlegroups.com
You don't say what options you are supplying to the invocation.  

C:>java -X
    -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by ;>
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by ;>
                      append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by ;>
                      prepend in front of bootstrap class path
    -Xdiag            show additional diagnostic messages
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:<file>    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.
    -XshowSettings    show all settings and continue
    -XshowSettings:all
                      show all settings and continue
    -XshowSettings:vm show all vm related settings and continue
    -XshowSettings:properties
                      show all property settings and continue
    -XshowSettings:locale
                      show all locale related settings and continue


You probably need something like -Xmx2G -Xss256K

Or some variant. 

Jim

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

haolinl...@gmail.com

unread,
Apr 8, 2016, 6:33:17 AM4/8/16
to antlr-discussion
As im running my project in intellij, it gives me the options to change heap size within the IDE, ive set the size for the heap to 2.5gb. However im still getting this issue

Jim Idle

unread,
Apr 8, 2016, 7:33:38 AM4/8/16
to antlr-discussion
Thread stack is different though. Try changing that. Could be s bug but I would think that someone would have found it by now. Maybe not


haolinl...@gmail.com

unread,
Apr 9, 2016, 4:53:30 AM4/9/16
to antlr-discussion
unfortunately i still that error anymore ideas?
Reply all
Reply to author
Forward
0 new messages