< prev index next >

src/hotspot/cpu/zero/frame_zero.cpp

Print this page

 81 frame frame::sender(RegisterMap* map) const {
 82   // Default is not to follow arguments; the various
 83   // sender_for_xxx methods update this accordingly.
 84   map->set_include_argument_oops(false);
 85 
 86   frame result = zeroframe()->is_entry_frame() ?
 87                  sender_for_entry_frame(map) :
 88                  sender_for_nonentry_frame(map);
 89 
 90   if (map->process_frames()) {
 91     StackWatermarkSet::on_iteration(map->thread(), result);
 92   }
 93 
 94   return result;
 95 }
 96 
 97 BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
 98   return get_interpreterState()->monitor_base();
 99 }
100 
101 BasicObjectLock* frame::interpreter_frame_monitor_end() const {





102   return (BasicObjectLock*) get_interpreterState()->stack_base();
103 }
104 
105 void frame::patch_pc(Thread* thread, address pc) {
106   if (pc != NULL) {
107     assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
108     _pc = pc;
109     _deopt_state = is_deoptimized;
110   } else {
111     // We borrow this call to set the thread pointer in the interpreter
112     // state; the hook to set up deoptimized frames isn't supplied it.
113     assert(pc == NULL, "should be");
114     get_interpreterState()->set_thread(JavaThread::cast(thread));
115   }
116 }
117 
118 bool frame::safe_for_sender(JavaThread *thread) {
119   ShouldNotCallThis();
120   return false;
121 }

164   case T_OBJECT:
165   case T_ARRAY:
166     if (method->is_native()) {
167       obj = get_interpreterState()->oop_temp();
168     }
169     else {
170       oop* obj_p = (oop *) tos_addr;
171       obj = (obj_p == NULL) ? (oop) NULL : *obj_p;
172     }
173     assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
174     *oop_result = obj;
175     break;
176 
177   default:
178     ShouldNotReachHere();
179   }
180 
181   return type;
182 }
183 
184 int frame::frame_size(RegisterMap* map) const {
185 #ifdef PRODUCT
186   ShouldNotCallThis();
187 #endif // PRODUCT
188   return 0; // make javaVFrame::print_value work
189 }
190 

191 intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
192   int index = (Interpreter::expr_offset_in_bytes(offset) / wordSize);
193   return &interpreter_frame_tos_address()[index];
194 }
195 
196 void frame::zero_print_on_error(int           frame_index,
197                                 outputStream* st,
198                                 char*         buf,
199                                 int           buflen) const {
200   // Divide the buffer between the field and the value
201   buflen >>= 1;
202   char *fieldbuf = buf;
203   char *valuebuf = buf + buflen;
204 
205   // Print each word of the frame
206   for (intptr_t *addr = sp(); addr <= fp(); addr++) {
207     int offset = fp() - addr;
208 
209     // Fill in default values, then try and improve them
210     snprintf(fieldbuf, buflen, "word[%d]", offset);

366       snprintf(fieldbuf, buflen, "monitor[%d]->_lock", index);
367 
368     return;
369   }
370 
371   // Expression stack
372   if (addr < stack_base) {
373     snprintf(fieldbuf, buflen, "%s[%d]",
374              frame_index == 0 ? "stack_word" : "local",
375              (int) (stack_base - addr - 1));
376     return;
377   }
378 }
379 
380 #ifndef PRODUCT
381 
382 void frame::describe_pd(FrameValues& values, int frame_no) {
383 
384 }
385 




386 #endif
387 
388 intptr_t *frame::initial_deoptimization_info() {
389   // unused... but returns fp() to minimize changes introduced by 7087445
390   return fp();
391 }
392 
393 #ifndef PRODUCT
394 // This is a generic constructor which is only used by pns() in debug.cpp.
395 frame::frame(void* sp, void* fp, void* pc) {
396   Unimplemented();
397 }
398 
399 #endif

 81 frame frame::sender(RegisterMap* map) const {
 82   // Default is not to follow arguments; the various
 83   // sender_for_xxx methods update this accordingly.
 84   map->set_include_argument_oops(false);
 85 
 86   frame result = zeroframe()->is_entry_frame() ?
 87                  sender_for_entry_frame(map) :
 88                  sender_for_nonentry_frame(map);
 89 
 90   if (map->process_frames()) {
 91     StackWatermarkSet::on_iteration(map->thread(), result);
 92   }
 93 
 94   return result;
 95 }
 96 
 97 BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
 98   return get_interpreterState()->monitor_base();
 99 }
100 
101 // Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
102 template BasicObjectLock* frame::interpreter_frame_monitor_end<true>() const;
103 template BasicObjectLock* frame::interpreter_frame_monitor_end<false>() const;
104 
105 template <bool relative>
106 inline BasicObjectLock* frame::interpreter_frame_monitor_end() const {
107   return (BasicObjectLock*) get_interpreterState()->stack_base();
108 }
109 
110 void frame::patch_pc(Thread* thread, address pc) {
111   if (pc != NULL) {
112     assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
113     _pc = pc;
114     _deopt_state = is_deoptimized;
115   } else {
116     // We borrow this call to set the thread pointer in the interpreter
117     // state; the hook to set up deoptimized frames isn't supplied it.
118     assert(pc == NULL, "should be");
119     get_interpreterState()->set_thread(JavaThread::cast(thread));
120   }
121 }
122 
123 bool frame::safe_for_sender(JavaThread *thread) {
124   ShouldNotCallThis();
125   return false;
126 }

169   case T_OBJECT:
170   case T_ARRAY:
171     if (method->is_native()) {
172       obj = get_interpreterState()->oop_temp();
173     }
174     else {
175       oop* obj_p = (oop *) tos_addr;
176       obj = (obj_p == NULL) ? (oop) NULL : *obj_p;
177     }
178     assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
179     *oop_result = obj;
180     break;
181 
182   default:
183     ShouldNotReachHere();
184   }
185 
186   return type;
187 }
188 
189 template intptr_t* frame::interpreter_frame_tos_at<false>(jint offset) const;
190 template intptr_t* frame::interpreter_frame_tos_at<true >(jint offset) const;




191 
192 template <bool relative>
193 intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
194   int index = (Interpreter::expr_offset_in_bytes(offset) / wordSize);
195   return &interpreter_frame_tos_address()[index];
196 }
197 
198 void frame::zero_print_on_error(int           frame_index,
199                                 outputStream* st,
200                                 char*         buf,
201                                 int           buflen) const {
202   // Divide the buffer between the field and the value
203   buflen >>= 1;
204   char *fieldbuf = buf;
205   char *valuebuf = buf + buflen;
206 
207   // Print each word of the frame
208   for (intptr_t *addr = sp(); addr <= fp(); addr++) {
209     int offset = fp() - addr;
210 
211     // Fill in default values, then try and improve them
212     snprintf(fieldbuf, buflen, "word[%d]", offset);

368       snprintf(fieldbuf, buflen, "monitor[%d]->_lock", index);
369 
370     return;
371   }
372 
373   // Expression stack
374   if (addr < stack_base) {
375     snprintf(fieldbuf, buflen, "%s[%d]",
376              frame_index == 0 ? "stack_word" : "local",
377              (int) (stack_base - addr - 1));
378     return;
379   }
380 }
381 
382 #ifndef PRODUCT
383 
384 void frame::describe_pd(FrameValues& values, int frame_no) {
385 
386 }
387 
388 void frame::describe_top_pd(FrameValues& values) {
389 
390 }
391 
392 #endif
393 
394 intptr_t *frame::initial_deoptimization_info() {
395   // unused... but returns fp() to minimize changes introduced by 7087445
396   return fp();
397 }
398 
399 #ifndef PRODUCT
400 // This is a generic constructor which is only used by pns() in debug.cpp.
401 frame::frame(void* sp, void* fp, void* pc) {
402   Unimplemented();
403 }
404 
405 #endif
< prev index next >