【问题标题】:jProfiler not giving method level statisticsjProfiler 不提供方法级别的统计信息
【发布时间】:2015-11-20 17:31:51
【问题描述】:

我已经在我的 Linux 机器上安装了jProfiler,并将数据保存到 .jps 文件中。然后我将此文件加载到我本地机器上的jProfiler UI 中。

这是我的配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<config>
  <nextId id="104" />
  <generalSettings setupHasRun="false">
    <recordingProfiles>
      <recordingProfile  id="10" name="CPU recording">
            <actionKey id="cpu"/>
      </recordingProfile>
    </recordingProfiles>
  </generalSettings>
  <templates>
    <template id="50" name="Instrumentation, all features supported" startFrozen="false" recordCPUOnStartup="false" vmCannotExit="false" instrumentationType="1" samplingNoFilters="false" lineNumbers="false" samplingFrequency="5" timeType="1" disableCPUProfiling="false" recordAllocOnStartup="true" recordArrayAlloc="true" enableTriggersOnStartup="true" allocTreeRecordingType="1" disableMonitorContentions="false" componentDetection="true" chronoHeap="false" autoUpdatePeriodLong="5" autoUpdatePeriodShort="2" allUrls="false" payloadCap="50" eventCap="20000" showSystemThreads="false" utilConcurrentHandling="true" libraryDebugParameters="" exceptionalCap="5" exceptionalTimeType="4" autoTuneInstrumentation="true" autoTuneMaxAverage="100" autoTuneMinPerMille="10" samplingPayloadCallStacks="true" description="This is JProfiler's fully featured mode. In this setting, call stack information is accurate, but CPU overhead and distortion of measured call times may be high, depending on your filter settings. You should define inclusive filters for your own packages." system="true" />
    <template id="51" name="Sampling for CPU profiling, some features not supported" startFrozen="false" recordCPUOnStartup="false" vmCannotExit="false" instrumentationType="3" samplingNoFilters="false" lineNumbers="false" samplingFrequency="5" timeType="1" disableCPUProfiling="false" recordAllocOnStartup="true" recordArrayAlloc="true" enableTriggersOnStartup="true" allocTreeRecordingType="1" disableMonitorContentions="false" componentDetection="true" chronoHeap="false" autoUpdatePeriodLong="5" autoUpdatePeriodShort="2" allUrls="false" payloadCap="50" eventCap="20000" showSystemThreads="false" utilConcurrentHandling="true" libraryDebugParameters="" exceptionalCap="5" exceptionalTimeType="4" autoTuneInstrumentation="true" autoTuneMaxAverage="100" autoTuneMinPerMille="10" samplingPayloadCallStacks="true" description="This template is particularly suitable for CPU profiling and for memory profiling when accurate allocation information is not important. Sampling has a very low overhead and does not distort measured call tines. Some views, like the method statistics are no available. JEE payloads cannot be annotated in the call tree, but payload hotspots without backtraces are available." system="true" />
  </templates>
  <sessions>
    <session id="80" templateId="50" name="Animated Bezier Curve Demo" type="1" isStartupWorkingDirectory="true" mainClass="bezier.BezierAnim">
      <filters>
        <filter type="inclusive" name="com." />
      </filters>
      <exceptionalMethods/>
      <classPath>
        <classPathEntry path="demo/bezier/classes" />
      </classPath>
      <sourcePath>
        <sourcePathEntry path="demo/bezier/src" />
      </sourcePath>
      <probes>
        <probe name="com.jprofiler.agent.probe.interceptor.TrackingInterceptor" enabled="true" startProbeRecording="false" events="false" annotatePayloads="false">
          <id value="3" />
        </probe>
      </probes>
    </session>

我面临的问题是我无法在jProfiler UI 的 CPU 视图选项卡下获得有关方法统计信息的任何详细信息。

但我可以获取 Telemetrics 中的其他字段。

使用的版本:JProfiler 9.1,我使用示例 config.xml 开始我的测试。我是否需要在我的配置文件中进行任何更改以在我的 .jps 文件中获取方法级别的统计信息

【问题讨论】:

    标签: java profiling jprofiler


    【解决方案1】:

    单独记录方法统计信息,因为开销太高,无法始终与 CPU 数据一起记录。

    会话进行时,进入方法统计视图并启用记录。对于离线分析,有一个启动方法统计记录的触发操作。

    【讨论】:

    • 您好,能否提供一个在 config.xml 文件中添加触发代码的示例。
    • 您必须在 GUI 中配置触发器,配置文件格式不打算手动编写。有关更多信息,请参阅resources.ej-technologies.com/jprofiler/help/doc/helptopics/…
    • 嗨,我创建了一个新会话并在 GUI 中为方法添加了触发器。但是从哪里获取新会话的配置文件呢?这样我就可以将它放在我的机器中并在分析时使用此会话 ID
    • 使用会话->导出会话设置
    • 感谢 Ingo,在选择方法级别触发时,选项 2 要求指定方法。如果我想分析所有方法并且还有很长的方法列表,我应该指定什么。在这种情况下我可以将其留空吗?以便它分析所有可用的方法?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-06
    • 2015-10-29
    相关资源
    最近更新 更多