Skip to content

Commit 2677f6f

Browse files
Xin LiuVladimir Kozlov
Xin Liu
authored and
Vladimir Kozlov
committed
8261675: ObjectValue::set_visited(bool) sets _visited false
Reviewed-by: kvn
1 parent e7e20d4 commit 2677f6f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/hotspot/share/code/debugInfo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ void ObjectValue::read_object(DebugInfoReadStream* stream) {
159159
}
160160

161161
void ObjectValue::write_on(DebugInfoWriteStream* stream) {
162-
if (_visited) {
162+
if (is_visited()) {
163163
stream->write_int(OBJECT_ID_CODE);
164164
stream->write_int(_id);
165165
} else {
166-
_visited = true;
166+
set_visited(true);
167167
stream->write_int(is_auto_box() ? AUTO_BOX_OBJECT_CODE : OBJECT_CODE);
168168
stream->write_int(_id);
169169
_klass->write_on(stream);

src/hotspot/share/code/debugInfo.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -149,7 +149,7 @@ class ObjectValue: public ScopeValue {
149149
bool is_visited() const { return _visited; }
150150

151151
void set_value(oop value);
152-
void set_visited(bool visited) { _visited = false; }
152+
void set_visited(bool visited) { _visited = visited; }
153153

154154
// Serialization of debugging information
155155
void read_object(DebugInfoReadStream* stream);

0 commit comments

Comments
 (0)