Skip to content

Commit 1e2aa61

Browse files
author
Evgeny Astigeevich
committed
8381770: Revert some shared changes done by JDK-8381003
Reviewed-by: kvn
1 parent 3468692 commit 1e2aa61

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/hotspot/share/code/nmethod.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,6 @@ nmethod::nmethod(
13321332
code_buffer->copy_values_to(this);
13331333

13341334
post_init();
1335-
ICache::invalidate_range(code_begin(), code_size());
13361335
}
13371336

13381337
if (PrintNativeNMethods || PrintDebugInfo || PrintRelocations || PrintDependencies) {
@@ -1812,7 +1811,6 @@ nmethod::nmethod(
18121811
init_immutable_data_ref_count();
18131812

18141813
post_init();
1815-
ICache::invalidate_range(code_begin(), code_size());
18161814

18171815
// we use the information of entry points to find out if a method is
18181816
// static or non static

src/hotspot/share/code/relocInfo.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,15 @@ oop oop_Relocation::oop_value() {
590590
return *oop_addr();
591591
}
592592

593+
void oop_Relocation::fix_oop_relocation() {
594+
// TODO: we need to add some assert here that ICache::invalidate_range is called in the code
595+
// which uses this function.
596+
if (!oop_is_immediate()) {
597+
// get the oop from the pool, and re-insert it into the instruction:
598+
set_value(value());
599+
}
600+
}
601+
593602
void oop_Relocation::verify_oop_relocation() {
594603
if (!oop_is_immediate()) {
595604
// get the oop from the pool, and re-insert it into the instruction:

src/hotspot/share/code/relocInfo.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,8 @@ class oop_Relocation : public DataRelocation {
988988
void pack_data_to(CodeSection* dest) override;
989989
void unpack_data() override;
990990

991+
void fix_oop_relocation(); // reasserts oop value
992+
991993
void verify_oop_relocation();
992994

993995
address value() override { return *reinterpret_cast<address*>(oop_addr()); }

0 commit comments

Comments
 (0)