Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/g1/g1OopClosures.inline.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2025, 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
Expand Down Expand Up @@ -50,8 +50,8 @@ inline void G1ScanClosureBase::prefetch_and_push(T* p, const oop obj) {
// stall. We'll try to prefetch the object (for write, given that
// we might need to install the forwarding reference) and we'll
// get back to it when pop it from the queue
Prefetch::write(obj->mark_addr(), 0);
Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
Prefetch::write(obj->base_addr(), oopDesc::mark_offset_in_bytes());
Prefetch::read(obj->base_addr(), oopDesc::mark_offset_in_bytes() + (HeapWordSize*2));

// slightly paranoid test; I'm trying to catch potential
// problems before we go into push_on_queue to know where the
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2025, 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
Expand Down Expand Up @@ -61,7 +61,7 @@ inline void PSPromotionManager::claim_or_forward_depth(T* p) {
if (PSScavenge::is_obj_in_young(heap_oop)) {
oop obj = CompressedOops::decode_not_null(heap_oop);
assert(!PSScavenge::is_obj_in_to_space(obj), "revisiting object?");
Prefetch::write(obj->mark_addr(), 0);
Prefetch::write(obj->base_addr(), oopDesc::mark_offset_in_bytes());
push_depth(ScannerTask(p));
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/share/oops/oop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ class oopDesc {
// Must be trivial; see verifying static assert after the class.
oopDesc() = default;

inline void* base_addr();
inline const void* base_addr() const;

inline markWord mark() const;
inline markWord mark_acquire() const;
inline markWord* mark_addr() const;

inline void set_mark(markWord m);
static inline void set_mark(HeapWord* mem, markWord m);
Expand Down
7 changes: 3 additions & 4 deletions src/hotspot/share/oops/oop.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
// Implementation of all inlined member functions defined in oop.hpp
// We need a separate file to avoid circular references

void* oopDesc::base_addr() { return this; }
const void* oopDesc::base_addr() const { return this; }

markWord oopDesc::mark() const {
return Atomic::load(&_mark);
}
Expand All @@ -55,10 +58,6 @@ markWord oopDesc::mark_acquire() const {
return Atomic::load_acquire(&_mark);
}

markWord* oopDesc::mark_addr() const {
return (markWord*) &_mark;
}

void oopDesc::set_mark(markWord m) {
Atomic::store(&_mark, m);
}
Expand Down