< prev index next >

src/share/vm/jfr/support/jfrAllocationTracer.cpp

Print this page
rev 9464 : PR for JDK8

*** 1,7 **** /* ! * Copyright (c) 2016, 2018, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 26,43 **** #include "jfr/leakprofiler/leakProfiler.hpp" #include "jfr/support/jfrAllocationTracer.hpp" #include "jfr/support/jfrThreadLocal.hpp" #include "runtime/thread.hpp" ! JfrAllocationTracer::JfrAllocationTracer(HeapWord* obj, size_t alloc_size, Thread* thread) : _tl(NULL) { 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(); - } - } --- 26,36 ---- #include "jfr/leakprofiler/leakProfiler.hpp" #include "jfr/support/jfrAllocationTracer.hpp" #include "jfr/support/jfrThreadLocal.hpp" #include "runtime/thread.hpp" ! JfrAllocationTracer::JfrAllocationTracer(HeapWord* obj, size_t alloc_size, Thread* thread) { if (LeakProfiler::is_running()) { assert(thread->is_Java_thread(), "invariant"); LeakProfiler::sample(obj, alloc_size, (JavaThread*)thread); } }
< prev index next >