File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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+
593602void oop_Relocation::verify_oop_relocation () {
594603 if (!oop_is_immediate ()) {
595604 // get the oop from the pool, and re-insert it into the instruction:
Original file line number Diff line number Diff 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 ()); }
You can’t perform that action at this time.
0 commit comments