mikemccand commented on PR #15983:
URL: https://github.com/apache/lucene/pull/15983#issuecomment-4345868221

   Hmm, there is some pre-existing issue that causes gradle not to print the 
JFR stack traces.  Instead it says this:
   
   ```
   > Task :showJfrProfileSummary
   One of the test tasks failed, skipping.
   ```
   
   Yet tests were successful, nothing seems to have failed.
   
   This is what I'm running:
   
   ```
   ./gradlew -p lucene/core test -Ptests.profile=true 
-Ptests.profile.stacksize=8 -Ptests.profile.linenumbers=true
   ```
   
   Somehow in 
[`CodeProfilingPlugin.java`](./build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/java/CodeProfilingPlugin.java)
 this part is false(?)-failing:
   
   ```
           if (getShouldRunConditions().get().stream().anyMatch(value -> value 
== false)) {
             getLogger().lifecycle("One of the test tasks failed, skipping.");
             return;
           }
   ```
   
   I haven't debugged any further yet ... if I disable that check then I get 
some profiler output but I don't think it's counting CPUTime events ... not 
sure:
   
   ```
   Aggregated summary of 1 jfr profile.
   PROFILE SUMMARY from 105485 events (total: 105485)
     tests.profile.mode=cpu
     tests.profile.count=10
     tests.profile.stacksize=8
     tests.profile.linenumbers=true
   PERCENT       CPU SAMPLES   STACK
   0.47%         498           sun.nio.ch.UnixFileDispatcherImpl#pread0() 
[Native code]
                                 at 
sun.nio.ch.UnixFileDispatcherImpl#pread():57 [JIT compiled code]
                                 at 
sun.nio.ch.IOUtil#readIntoNativeBuffer():339 [JIT compiled code]
                                 at sun.nio.ch.IOUtil#read():307 [JIT compiled 
code]
                                 at sun.nio.ch.IOUtil#read():284 [Inlined code]
                                 at 
sun.nio.ch.FileChannelImpl#readInternal():1198 [JIT compiled code]
                                 at sun.nio.ch.FileChannelImpl#implRead():1170 
[JIT compiled code]
                                 at sun.nio.ch.FileChannelImpl#read():1152 [JIT 
compiled code]
   0.25%         265           
org.apache.lucene.util.ByteBlockPool$DirectTrackingAllocator#getByteBlock():97 
[JIT compiled cod\
   e]
                                 at 
org.apache.lucene.util.ByteBlockPool#nextBuffer():196 [JIT compiled code]
                                 at 
org.apache.lucene.index.TermsHashPerField#initStreamSlices():161 [JIT compiled 
code]
                                 at 
org.apache.lucene.index.TermsHashPerField#add():139 [Inlined code]
                                 at 
org.apache.lucene.index.TermsHashPerField#add():207 [JIT compiled code]
                                 at 
org.apache.lucene.index.IndexingChain$PerField#invertTokenStream():1365 [JIT 
compiled code]
                                 at 
org.apache.lucene.index.IndexingChain$PerField#invert():1256 [JIT compiled code]
                                 at 
org.apache.lucene.index.IndexingChain#processField():773 [JIT compiled code]
   ```
   
   I'm also baffled by the total event count (105485) ... it doesn't match what 
`jfr summary` says for `jdk.CPUTimeSample`:
   
   ```
   base) raptorlake:trunk[main]$ jfr summary 
./lucene/core/build/tests-cwd/hotspot-pid-3877240-id-1-2026_04_29_12_55_47.jfr
   
    Version: 2.1
    Chunks: 7
    Start: 2026-04-29 16:53:42 (UTC)
    Duration: 125 s
   
    Event Type                              Count  Size (bytes)
   =============================================================
    jdk.ObjectAllocationInNewTLAB          164932       3167800
    jdk.CPUTimeSample                      111550       1964718
    jdk.ObjectAllocationOutsideTLAB         22485        386121
    org.junit.TestExecution                  8673        671942
    jdk.Checkpoint                           7698      81389727
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to