gpt4 book ai didi

java - 在 visualvm 堆转储中, "Local Variable"之后的线程数是多少?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:38:31 26 4
gpt4 key购买 nike

我正在使用 VisualVM 分析堆转储中的线程,我想知道下面线程中 Local Variable: byte[] 后面的计数是什么意思?这是否意味着变量的大小?或变量的实例总数?还是别的?

"Multicast Heartbeat Receiver Thread" daemon prio=5 tid=38 RUNNABLE
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(<unknown string>)
Local Variable: java.util.zip.ZStreamRef#366
Local Variable: java.util.zip.Inflater#366
at java.util.zip.InflaterInputStream.read(<unknown string>)
at java.util.zip.GZIPInputStream.read(<unknown string>)
at net.sf.ehcache.distribution.PayloadUtil.ungzip(PayloadUtil.java:194)
Local Variable: java.util.zip.GZIPInputStream#1
Local Variable: byte[]#537427
Local Variable: byte[]#537474
Local Variable: java.io.ByteArrayOutputStream#317
at net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatReceiver$MulticastReceiverThread.processPayload(MulticastKeepaliveHeartbeatReceiver.java:142)
Local Variable: org.glowroot.agent.model.TraceEntryImpl#12145
Local Variable: org.glowroot.agent.model.OptionalThreadContextImpl#7
at net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatReceiver$MulticastReceiverThread.run(MulticastKeepaliveHeartbeatReceiver.java:126)
Local Variable: byte[]#4513

最佳答案

# 之后的数字是序列号。例如。 局部变量:byte[]#537427 表示这是 byte[] 的第 537427 个实例。

如果你点击 visual vm 中的 instances 选项卡,就会变得很清楚。在下图中,我看到了测试程序中所有字节数组的列表,从 #1 开始枚举,其中 N 项 表示数组的大小。

enter image description here

关于java - 在 visualvm 堆转储中, "Local Variable"之后的线程数是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37401263/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com