You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used a Java wrapper to collect data from Java_sun_nio_ch_IOUtil_makePipe, but it didn't work. However, using profiler.sh, I was able to collect the data, even though they use the same library.
async profiler version 2.8
Java Wrapper
The complete command executed using the Java wrapper is: start,event=Java_sun_nio_ch_IOUtil_makePipe,cstack=fp,interval=10ms,file=/tmp/profile1699956077050.jfr
The settings in the collected JFR file also indicate that the command is correct:
`jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "version"
value = "2.8"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "ring"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "cstack"
value = "fp"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "event"
value = "Java_sun_nio_ch_IOUtil_makePipe"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "filter"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "begin"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "end"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "jstackdepth"
value = "2048"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "safemode"
value = "0"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "jfropts"
value = "0"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "chunksize"
value = "104857600"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "chunktime"
value = "3600"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 101
name = "enabled"
value = "true"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 101
name = "interval"
value = "10000000"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 102
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 103
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 104
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 105
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "debugSymbols"
value = "true"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "kernelSymbols"
value = "true"
eventThread = "profiler-executor" (javaThreadId = 2343)
}`
profiler.sh
The command used to collect data using profiler.sh is as follows:
event=function_name enables tracing profiler. If you want to capture every single function call, do not set interval at all or set it to 1. Otherwise, profiler will work in sampling mode to capture every Nth call.
I used a Java wrapper to collect data from Java_sun_nio_ch_IOUtil_makePipe, but it didn't work. However, using profiler.sh, I was able to collect the data, even though they use the same library.
async profiler version 2.8
Java Wrapper
The complete command executed using the Java wrapper is:
start,event=Java_sun_nio_ch_IOUtil_makePipe,cstack=fp,interval=10ms,file=/tmp/profile1699956077050.jfr
The settings in the collected JFR file also indicate that the command is correct:
`jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "version"
value = "2.8"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "ring"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "cstack"
value = "fp"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "event"
value = "Java_sun_nio_ch_IOUtil_makePipe"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "filter"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "begin"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "end"
value = N/A
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "jstackdepth"
value = "2048"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "safemode"
value = "0"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "jfropts"
value = "0"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "chunksize"
value = "104857600"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "chunktime"
value = "3600"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 101
name = "enabled"
value = "true"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 101
name = "interval"
value = "10000000"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 102
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 103
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 104
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 105
name = "enabled"
value = "false"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "debugSymbols"
value = "true"
eventThread = "profiler-executor" (javaThreadId = 2343)
}
jdk.ActiveSetting {
startTime = 2023-11-14T08:12:31.023202Z
id = 107
name = "kernelSymbols"
value = "true"
eventThread = "profiler-executor" (javaThreadId = 2343)
}`
profiler.sh
The command used to collect data using profiler.sh is as follows:
./profiler.sh -d 60 -e Java_sun_nio_ch_IOUtil_makePipe --cstack fp --jfrsync default -f p.jfr 58
settings:
`
jdk.ActiveSetting {
startTime = 2023-11-14T09:13:54.688909Z
id = 107
name = "version"
value = "2.8"
eventThread = "Attach Listener" (javaThreadId = 154)
}
jdk.ActiveSetting {
startTime = 2023-11-14T09:13:54.688909Z
id = 107
name = "ring"
value = N/A
eventThread = "Attach Listener" (javaThreadId = 154)
}
jdk.ActiveSetting {
startTime = 2023-11-14T09:13:54.688909Z
id = 107
name = "cstack"
value = "fp"
eventThread = "Attach Listener" (javaThreadId = 154)
}
jdk.ActiveSetting {
startTime = 2023-11-14T09:13:54.688909Z
id = 107
name = "event"
value = "Java_sun_nio_ch_IOUtil_makePipe"
eventThread = "Attach Listener" (javaThreadId = 154)
}
`
result:
`jdk.ExecutionSample {
startTime = 2023-11-14T09:13:56.264258508Z
sampledThread = "kafka-lag-scan-2051" (javaThreadId = 13258)
state = "STATE_RUNNABLE"
stackTrace = [
libnio.so.Java_sun_nio_ch_IOUtil_makePipe() line: 0
sun.nio.ch.IOUtil.makePipe(boolean) line: 0
sun.nio.ch.EPollSelectorImpl.(SelectorProvider) line: 83
sun.nio.ch.EPollSelectorProvider.openSelector() line: 36
java.nio.channels.Selector.open() line: 295
...
]
}
jdk.ExecutionSample {
startTime = 2023-11-14T09:13:56.432912837Z
sampledThread = "kafka-lag-scan-2051" (javaThreadId = 13258)
state = "STATE_RUNNABLE"
stackTrace = [
libnio.so.Java_sun_nio_ch_IOUtil_makePipe() line: 0
sun.nio.ch.IOUtil.makePipe(boolean) line: 0
sun.nio.ch.EPollSelectorImpl.(SelectorProvider) line: 83
sun.nio.ch.EPollSelectorProvider.openSelector() line: 36
java.nio.channels.Selector.open() line: 295
...
]
}`
The text was updated successfully, but these errors were encountered: