--- old/src/share/vm/jfr/support/jfrAllocationTracer.cpp 2021-07-05 14:06:00.269156080 +0000 +++ new/src/share/vm/jfr/support/jfrAllocationTracer.cpp 2021-07-05 14:06:00.209155188 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,9 @@ #include "jfr/support/jfrThreadLocal.hpp" #include "runtime/thread.hpp" -JfrAllocationTracer::JfrAllocationTracer(HeapWord* obj, size_t alloc_size, Thread* thread) : _tl(NULL) { +JfrAllocationTracer::JfrAllocationTracer(HeapWord* obj, size_t alloc_size, Thread* thread) { if (LeakProfiler::is_running()) { assert(thread->is_Java_thread(), "invariant"); - _tl = thread->jfr_thread_local(); LeakProfiler::sample(obj, alloc_size, (JavaThread*)thread); } } - -JfrAllocationTracer::~JfrAllocationTracer() { - if (_tl != NULL) { - _tl->clear_cached_stack_trace(); - } -}