提交 0b5f6bce 编写于 作者: D Denghui Dong

Revert "[JFR] Fix build issues caused by object allocation profiling on Windows/Mac"

This reverts commit ca5fefe8.
上级 257eab1b
......@@ -22,7 +22,6 @@
*
*/
#include "precompiled.hpp"
#include "gc_implementation/shared/gcId.hpp"
#include "gc_interface/allocTracer.hpp"
#include "trace/tracing.hpp"
......
......@@ -30,19 +30,17 @@
#include "utilities/globalDefinitions.hpp"
class AllocTracer : AllStatic {
private:
static void send_opto_array_allocation_event(KlassHandle klass, oop obj,size_t alloc_size, Thread* thread);
static void send_opto_instance_allocation_event(KlassHandle klass, oop obj, Thread* thread);
public:
static void send_allocation_outside_tlab_event(KlassHandle klass, HeapWord* obj, size_t alloc_size, Thread* thread);
static void send_allocation_in_new_tlab_event(KlassHandle klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, Thread* thread);
static void send_allocation_requiring_gc_event(size_t size, const GCId& gcId);
#if INCLUDE_TRACE
static void opto_slow_allocation_enter(bool is_array, Thread* thread);
static void opto_slow_allocation_leave(bool is_array, Thread* thread);
static void send_slow_allocation_event(KlassHandle klass, oop obj,size_t alloc_size, Thread* thread);
static void send_opto_fast_allocation_event(KlassHandle klass, oop obj, size_t alloc_size, Thread* thread);
private:
static void send_opto_array_allocation_event(KlassHandle klass, oop obj,size_t alloc_size, Thread* thread);
static void send_opto_instance_allocation_event(KlassHandle klass, oop obj, Thread* thread);
#endif
};
#endif /* SHARE_VM_GC_INTERFACE_ALLOCTRACER_HPP */
......@@ -22,7 +22,6 @@
#ifndef SHARE_VM_GC_INTERFACE_ALLOCTRACER_INLINE_HPP
#define SHARE_VM_GC_INTERFACE_ALLOCTRACER_INLINE_HPP
#if INCLUDE_TRACE
#include "trace/tracing.hpp"
#include "gc_implementation/shared/gcId.hpp"
#include "runtime/handles.hpp"
......@@ -118,5 +117,4 @@ inline void AllocTracer::send_opto_fast_allocation_event(KlassHandle klass, oop
thread->trace_data()->incr_alloc_count_until_sample(interval);
}
#endif // INCLUDE_TRACE
#endif /* SHARE_VM_GC_INTERFACE_ALLOCTRACER_INLINE_HPP */
......@@ -324,12 +324,10 @@ class CollectedHeap : public CHeapObj<mtInternal> {
inline static void check_array_size(int size, int length, TRAPS);
public:
#if INCLUDE_TRACE
// Implicit Jfr inline methods.
static void trace_slow_allocation(KlassHandle klass, oop obj, size_t alloc_size, Thread* thread) {
AllocTracer::send_slow_allocation_event(klass, obj, alloc_size, thread);
}
#endif
static void trace_allocation_outside_tlab(KlassHandle klass, HeapWord* obj, size_t alloc_size, Thread* thread) {
AllocTracer::send_allocation_outside_tlab_event(klass, obj, alloc_size, thread);
......
......@@ -85,10 +85,8 @@ inline void post_allocation_notify(KlassHandle klass, oop obj, int size) {
}
}
#if INCLUDE_TRACE
// support for jfr
CollectedHeap::trace_slow_allocation(klass, obj, size * HeapWordSize, Thread::current());
#endif
}
void CollectedHeap::post_allocation_setup_obj(KlassHandle klass,
......
......@@ -1442,11 +1442,9 @@ void PhaseMacroExpand::expand_allocate_common(
}
}
#if INCLUDE_TRACE
if (EnableJFR && JfrOptionSet::sample_object_allocations()) {
jfr_sample_fast_object_allocation(alloc, fast_oop, fast_oop_ctrl, fast_oop_rawmem);
}
#endif
if (C->env()->dtrace_extended_probes()) {
// Slow-path call
......@@ -1645,7 +1643,6 @@ static jint bottom_java_frame_bci(JVMState* state) {
return last->bci();
}
#if INCLUDE_TRACE
//
// Pseudo code:
//
......@@ -1742,7 +1739,6 @@ void PhaseMacroExpand::jfr_sample_fast_object_allocation(
fast_oop_rawmem = alloc_sample_enabled_region_phi_mem;
}
}
#endif
// Helper for PhaseMacroExpand::expand_allocate_common.
// Initializes the newly-allocated storage.
......
......@@ -123,11 +123,9 @@ private:
Node* old_eden_top, Node* new_eden_top,
Node* length);
#if INCLUDE_TRACE
//JFR tracing
void jfr_sample_fast_object_allocation(AllocateNode* alloc, Node* fast_oop,
Node*& fast_oop_ctrl, Node*& fast_oop_rawmem);
#endif
public:
PhaseMacroExpand(PhaseIterGVN &igvn) : Phase(Macro_Expand), _igvn(igvn), _has_locks(false) {
......
......@@ -1695,7 +1695,6 @@ JRT_END
//-----------------------------------------------------------------------------
// JFR support.
#if INCLUDE_TRACE
const TypeFunc *OptoRuntime::jfr_fast_object_alloc_Type() {
const Type **fields = TypeTuple::fields(3);
fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // newly allocated object
......@@ -1722,4 +1721,3 @@ void OptoRuntime::jfr_fast_object_alloc_C(oopDesc* obj, jint top_frame_bci, Java
thread->trace_data()->clear_cached_top_frame_bci();
thread->set_vm_result(obj);
}
#endif
......@@ -179,10 +179,8 @@ public:
static void complete_monitor_locking_C(oopDesc* obj, BasicLock* lock, JavaThread* thread);
static void complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock);
#if INCLUDE_TRACE
// JFR support
static void jfr_fast_object_alloc_C(oopDesc* obj, jint bci, JavaThread* thread);
#endif
private:
// Implicit exception support
......@@ -343,10 +341,8 @@ private:
static const TypeFunc* zap_dead_locals_Type();
# endif
#if INCLUDE_TRACE
// JFR support
static const TypeFunc* jfr_fast_object_alloc_Type();
#endif
private:
static NamedCounter * volatile _named_counters;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册