Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the difference between profiler.LiveObject and jdk.ObjectAllocationInNewTLAB #869

Closed
zdyj3170101136 opened this issue Dec 15, 2023 · 1 comment
Labels

Comments

@zdyj3170101136
Copy link

zdyj3170101136 commented Dec 15, 2023

start async profiler to live heap analyze:

sprof collect -d 30 --cstack dwarf --alloc 512 --live -o jfr -f heap.jfr 2404664

the information of heap.jfr:

jar summary heap.jfr

截屏2023-12-15 下午6 16 45

is jdk.ObjectAllocationInNewTLAB means the still lived object in 30 seconds?

what is the profiler.LiveObject meanings?

jfr print --events profiler.LiveObject --stack-depth  128  heap.jfr
profiler.LiveObject {
  startTime = 2023-12-15T10:13:12.271723581Z
  objectClass = com.alibaba.fastjson2.benchmark.eishay.vo.Media (classLoader = null)
  allocationSize = 64
  allocationTime = 2023-12-15T10:13:08.645394444Z
  eventThread = "com.alibaba.fastjson2.benchmark.eishay.EishayParseBinary.fastjson2UTF8Bytes-jmh-worker-12" (javaThreadId = 25)
  stackTrace = [
    libasyncProfiler.so.Profiler::getNativeTrace() line: 0
    libasyncProfiler.so.Profiler::recordSample() line: 0
    libasyncProfiler.so.ObjectSampler::recordAllocation() line: 0
    libjvm.so.JvmtiExport::post_sampled_object_alloc() line: 0
    libjvm.so.JvmtiObjectAllocEventCollector::generate_call_for_allocated() line: 0
    libjvm.so.JvmtiSampledObjectAllocEventCollector::~JvmtiSampledObjectAllocEventCollector() line: 0
    libjvm.so.MemAllocator::Allocation::notify_allocation_jvmti_sampler() line: 0
    libjvm.so.MemAllocator::allocate() line: 0
    libjvm.so.CollectedHeap::obj_allocate() line: 0
    libjvm.so.InstanceKlass::allocate_instance() line: 0
    libjvm.so.OptoRuntime::new_instance_C() line: 0
    com.alibaba.fastjson2.reader.ORG_3_11_Media.readObject(JSONReader, Type, Object, long) line: 0
    com.alibaba.fastjson2.reader.ORG_1_2_MediaContent.readObject(JSONReader, Type, Object, long) line: 0
    com.alibaba.fastjson2.JSON.parseObject(byte[], Class) line: 1365
    com.alibaba.fastjson2.benchmark.eishay.EishayParseBinary.fastjson2UTF8Bytes(Blackhole) line: 90
    com.alibaba.fastjson2.benchmark.eishay.jmh_generated.EishayParseBinary_fastjson2UTF8Bytes_jmhTest.fastjson2UTF8Bytes_thrpt_jmhStub(InfraControl, RawResults, BenchmarkParams, IterationParams, ThreadParams, Blackhole, Control, int, EishayParseBinary_jmhType) line: 119
    com.alibaba.fastjson2.benchmark.eishay.jmh_generated.EishayParseBinary_fastjson2UTF8Bytes_jmhTest.fastjson2UTF8Bytes_Throughput(InfraControl, ThreadParams) line: 83
    jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Object, Object[]) line: 0
    jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
    java.lang.reflect.Method.invoke(Object, Object[]) line: 566
    org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call() line: 475
    org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call() line: 458
    java.util.concurrent.FutureTask.run() line: 264
    java.util.concurrent.Executors$RunnableAdapter.call() line: 515
    java.util.concurrent.FutureTask.run() line: 264
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1128
    java.util.concurrent.ThreadPoolExecutor$Worker.run() line: 628
    java.lang.Thread.run() line: 829
  ]
@apangin
Copy link
Collaborator

apangin commented Dec 15, 2023

is jdk.ObjectAllocationInNewTLAB means the still lived object in 30 seconds?

No, the meaning of jdk.ObjectAllocationInNewTLAB is the same regardless of --live option.

what is the profiler.LiveObject meanings?

It records allocation samples that have been allocated during profiling session, but have not been garbage-collected by the end of the session.

@apangin apangin closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants