< prev index next >

src/hotspot/share/runtime/continuationEntry.cpp

Print this page

 94 }
 95 
 96 void ContinuationEntry::flush_stack_processing(JavaThread* thread) const {
 97   maybe_flush_stack_processing(thread, (intptr_t*)((uintptr_t)entry_sp() + ContinuationEntry::size()));
 98 }
 99 
100 #ifndef PRODUCT
101 void ContinuationEntry::describe(FrameValues& values, int frame_no) const {
102   address usp = (address)this;
103   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::parent_offset())),    "parent");
104   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::cont_offset())),      "continuation");
105   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::flags_offset())),     "flags");
106   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::chunk_offset())),     "chunk");
107   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::argsize_offset())),   "argsize");
108   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::pin_count_offset())), "pin_count");
109   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::parent_cont_fastpath_offset())),      "parent fastpath");
110 }
111 #endif
112 
113 #ifdef ASSERT
114 bool ContinuationEntry::assert_entry_frame_laid_out(JavaThread* thread) {
115   assert(thread->has_last_Java_frame(), "Wrong place to use this assertion");
116 


117   ContinuationEntry* entry = thread->last_continuation();
118   assert(entry != nullptr, "");
119 
120   intptr_t* unextended_sp = entry->entry_sp();
121   intptr_t* sp;
122   if (entry->argsize() > 0) {
123     sp = entry->bottom_sender_sp();
124   } else {
125     sp = unextended_sp;
126     bool interpreted_bottom = false;
127     RegisterMap map(thread,
128                     RegisterMap::UpdateMap::skip,
129                     RegisterMap::ProcessFrames::skip,
130                     RegisterMap::WalkContinuation::skip);
131     frame f;
132     for (f = thread->last_frame();
133          !f.is_first_frame() && f.sp() <= unextended_sp && !Continuation::is_continuation_enterSpecial(f);
134          f = f.sender(&map)) {
135       interpreted_bottom = f.is_interpreted_frame();
136     }

 94 }
 95 
 96 void ContinuationEntry::flush_stack_processing(JavaThread* thread) const {
 97   maybe_flush_stack_processing(thread, (intptr_t*)((uintptr_t)entry_sp() + ContinuationEntry::size()));
 98 }
 99 
100 #ifndef PRODUCT
101 void ContinuationEntry::describe(FrameValues& values, int frame_no) const {
102   address usp = (address)this;
103   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::parent_offset())),    "parent");
104   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::cont_offset())),      "continuation");
105   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::flags_offset())),     "flags");
106   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::chunk_offset())),     "chunk");
107   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::argsize_offset())),   "argsize");
108   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::pin_count_offset())), "pin_count");
109   values.describe(frame_no, (intptr_t*)(usp + in_bytes(ContinuationEntry::parent_cont_fastpath_offset())),      "parent fastpath");
110 }
111 #endif
112 
113 #ifdef ASSERT
114 bool ContinuationEntry::assert_entry_frame_laid_out(JavaThread* thread, bool preempted) {
115   assert(thread->has_last_Java_frame(), "Wrong place to use this assertion");
116 
117   if (preempted) return true;
118 
119   ContinuationEntry* entry = thread->last_continuation();
120   assert(entry != nullptr, "");
121 
122   intptr_t* unextended_sp = entry->entry_sp();
123   intptr_t* sp;
124   if (entry->argsize() > 0) {
125     sp = entry->bottom_sender_sp();
126   } else {
127     sp = unextended_sp;
128     bool interpreted_bottom = false;
129     RegisterMap map(thread,
130                     RegisterMap::UpdateMap::skip,
131                     RegisterMap::ProcessFrames::skip,
132                     RegisterMap::WalkContinuation::skip);
133     frame f;
134     for (f = thread->last_frame();
135          !f.is_first_frame() && f.sp() <= unextended_sp && !Continuation::is_continuation_enterSpecial(f);
136          f = f.sender(&map)) {
137       interpreted_bottom = f.is_interpreted_frame();
138     }
< prev index next >