< prev index next >
src/hotspot/share/code/scopeDesc.cpp
Print this page
rev 60137 : 8227745: Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents
Reviewed-by: mdoerr, goetz
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2020, 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.
@@ -28,27 +28,20 @@
#include "code/scopeDesc.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
-ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool rethrow_exception, bool return_oop) {
+ScopeDesc::ScopeDesc(const CompiledMethod* code, PcDesc* pd, bool ignore_objects) {
+ int obj_decode_offset = ignore_objects ? DebugInformationRecorder::serialized_null : pd->obj_decode_offset();
_code = code;
- _decode_offset = decode_offset;
+ _decode_offset = pd->scope_decode_offset();
_objects = decode_object_values(obj_decode_offset);
- _reexecute = reexecute;
- _rethrow_exception = rethrow_exception;
- _return_oop = return_oop;
- decode_body();
-}
-
-ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, bool reexecute, bool rethrow_exception, bool return_oop) {
- _code = code;
- _decode_offset = decode_offset;
- _objects = decode_object_values(DebugInformationRecorder::serialized_null);
- _reexecute = reexecute;
- _rethrow_exception = rethrow_exception;
- _return_oop = return_oop;
+ _reexecute = pd->should_reexecute();
+ _rethrow_exception = pd->rethrow_exception();
+ _return_oop = pd->return_oop();
+ _not_global_escape_in_scope = ignore_objects ? false : pd->not_global_escape_in_scope();
+ _arg_escape = ignore_objects ? false : pd->arg_escape();
decode_body();
}
void ScopeDesc::initialize(const ScopeDesc* parent, int decode_offset) {
@@ -56,10 +49,12 @@
_decode_offset = decode_offset;
_objects = parent->_objects;
_reexecute = false; //reexecute only applies to the first scope
_rethrow_exception = false;
_return_oop = false;
+ _not_global_escape_in_scope = parent->not_global_escape_in_scope();
+ _arg_escape = false;
decode_body();
}
ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
initialize(parent, parent->_sender_decode_offset);
< prev index next >