Giter VIP home page Giter VIP logo

Comments (11)

liusy58 avatar liusy58 commented on June 11, 2024

Screenshot from 2021-11-12 11-21-08

the error message is below:

11:10:50.887 [JavaFX Application Thread] WARN  o.a.j.c.CompilationUtil - No Task found in Compilation 11
Exception in thread "Thread-11" java.util.EmptyStackException
        at java.base/java.util.Stack.peek(Stack.java:101)
        at java.base/java.util.Stack.pop(Stack.java:83)
        at org.adoptopenjdk.jitwatch.core.TagProcessor.handleTag(TagProcessor.java:140)
        at org.adoptopenjdk.jitwatch.core.TagProcessor.processLine(TagProcessor.java:57)
        at org.adoptopenjdk.jitwatch.parser.hotspot.HotSpotLogParser.parseLogCompilationLines(HotSpotLogParser.java:148)
        at org.adoptopenjdk.jitwatch.parser.hotspot.HotSpotLogParser.parseLogFile(HotSpotLogParser.java:130)
        at org.adoptopenjdk.jitwatch.parser.AbstractLogParser.processLogFile(AbstractLogParser.java:366)
        at org.adoptopenjdk.jitwatch.parser.ILogParser.processLogFile(ILogParser.java:23)
        at org.adoptopenjdk.jitwatch.ui.main.JITWatchUI$1.run(JITWatchUI.java:246)
        at java.base/java.lang.Thread.run(Thread.java:831)
Exception in thread "Thread-12" java.util.EmptyStackException
        at java.base/java.util.Stack.peek(Stack.java:101)
        at java.base/java.util.Stack.pop(Stack.java:83)
        at org.adoptopenjdk.jitwatch.core.TagProcessor.handleTag(TagProcessor.java:140)
        at org.adoptopenjdk.jitwatch.core.TagProcessor.processLine(TagProcessor.java:57)
        at org.adoptopenjdk.jitwatch.parser.hotspot.HotSpotLogParser.parseLogCompilationLines(HotSpotLogParser.java:148)
        at org.adoptopenjdk.jitwatch.parser.hotspot.HotSpotLogParser.parseLogFile(HotSpotLogParser.java:130)
        at org.adoptopenjdk.jitwatch.parser.AbstractLogParser.processLogFile(AbstractLogParser.java:366)
        at org.adoptopenjdk.jitwatch.parser.ILogParser.processLogFile(ILogParser.java:23)
        at org.adoptopenjdk.jitwatch.ui.main.JITWatchUI$1.run(JITWatchUI.java:246)
        at java.base/java.lang.Thread.run(Thread.java:831)

from jitwatch.

chriswhocodes avatar chriswhocodes commented on June 11, 2024

Hi, please can you share the source/class file and the command line options used to run it?

Thanks,

Chris

from jitwatch.

liusy58 avatar liusy58 commented on June 11, 2024

Hi, Chris, sorry for my late reply. My command-line option is java -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:-TieredCompilation -XX:+PrintAssembly -XX:-UseCompressedOops sumBenchmark.java

The source file is

import java.io.IOException;

import java.nio.file.*;
public class sumBenchmark {
    public int count(int n) {
        int res = 0;
        for(int i=1;i<=n;++i){
            if(i%2 == 1){
                res  += i;
            }else{
                res -= i;
            }
        }
        return res;
    }
    public static void main(String[] args) {
        int res =0;
        sumBenchmark summer = new sumBenchmark();

        for(int i=1;i<=10000;++i){
            res += summer.count(i);
        }
        System.out.println(res);
    }
}

from jitwatch.

chriswhocodes avatar chriswhocodes commented on June 11, 2024

TriView-snapshot-2021 11 13 13 14 30
Hi, OpenJDK17 (Temurin) seems to work for me.
Are you running your code in the JITWatch "Sandbox" or analysing a LogCompilation file your output from an execution outside JITWatch?

If the latter then please can you paste your logcompilation file please?

Also, is the problem repeatable? Sometimes with short programs the JVM exits before completely writing the logcompilation file so you don't get a usable log file.

Cheers,

Chris

from jitwatch.

liusy58 avatar liusy58 commented on June 11, 2024

Yeah, the latter one, this problem is repeatable. I think I do not correctly understand the JITWatch Configuration, I'll try running my code in the JITWatch "Sandbox". So could you please tell see your settings about source locations and class locations?

Thank you, Chris.

from jitwatch.

chriswhocodes avatar chriswhocodes commented on June 11, 2024

Hi, with the sandbox it automatically finds your source and class locations. Manual configuration is only needed for external log files :)

from jitwatch.

liusy58 avatar liusy58 commented on June 11, 2024

Okay, I'll try later. Thank you for your patience. By the way, are you familiar with JVM execution engine about JIT? I mean the logic about C1 compiler and C2 compiler, especially the code emit phase, the optimization technology is not what I care, I only care about the phase from lir to native code. The source code really puzzles me, any help?

from jitwatch.

chriswhocodes avatar chriswhocodes commented on June 11, 2024

I know a little but the hotspot-compiler-dev mailing list is the best place to ask about compiler internals :)

from jitwatch.

liusy58 avatar liusy58 commented on June 11, 2024

Okay, thank you a lot!!! Have a nice day!!!!

from jitwatch.

liusy58 avatar liusy58 commented on June 11, 2024

Hi, Chris, sorry to disturb you again, I sent emails to hotspot-compiler-dev mailing list, but no response. Any help?

from jitwatch.

chriswhocodes avatar chriswhocodes commented on June 11, 2024

Hi, I'm closing all the issues except for the ones I'm actively working on.

from jitwatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.