-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
Java Agent (apache/skywalking-java)
What happened
I found that in this java file (https://github.com/apache/skywalking-java/blob/v9.0.0/apm-sniffer/bootstrap-plugins/jdk-forkjoinpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/forkjoinpool/define/ForkJoinWorkerQueueInstrumentation.java)
this variable of method is not in jdk11,it is in jdk8
private static final String FORK_JOIN_WORKER_QUEUE_RUN_TASK_METHOD = "runTask";
What you expected to happen
in java11
The runWorker method is one of the core methods of ForkJoinPool, responsible for retrieving tasks from the work queue and executing them.
Within the runWorker method, it calls the scan method to search and execute tasks.
ForkJoinPool. scan calls WorkQueue. topLevelExec
/** * Runs the given (stolen) task if nonnull, as well as * remaining local tasks and others available from the given * queue, up to bound n (to avoid infinite unfairness). */ final void topLevelExec(ForkJoinTask<?> t, WorkQueue q, int n) { if (t != null && q != null) { // hoist checks int nstolen = 1; for (;;) { t.doExec(); if (n-- < 0) break; else if ((t = nextLocalTask()) == null) { if ((t = q.poll()) == null) break; else ++nstolen; } } ForkJoinWorkerThread thread = owner; nsteals += nstolen; source = 0; if (thread != null) thread.afterTopLevelExec(); } }
How to reproduce
in java8 api-jdk-forkjoinpool-plugin is effective.
in java11 api-jdk-forkjoinpool-plugin is not effective.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct