comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 10672:e7d07c9bb779

Removed priority compilation queue. Fixed another race condition in the compilation queue. Removed Graal-specific compilation policy.
author Christian Haeubl <haeubl@ssw.jku.at>
date Tue, 09 Jul 2013 17:53:58 +0200
parents 4b88e5c93f04
children 6b0fd0964b87
comparison
equal deleted inserted replaced
10665:dcee58529a1c 10672:e7d07c9bb779
301 301
302 302
303 303
304 // Helpers for commoning out cases in the various type of method entries. 304 // Helpers for commoning out cases in the various type of method entries.
305 // 305 //
306
307 #ifdef GRAALVM
308
309 void graal_initialize_time(JavaThread* thread) {
310 assert(ProfileInterpreter, "must be profiling interpreter");
311 frame fr = thread->last_frame();
312 assert(fr.is_interpreted_frame(), "must come from interpreter");
313 assert(fr.interpreter_frame_method()->method_counters() != NULL, "need to initialize method counters");
314 fr.interpreter_frame_method()->method_counters()->set_graal_invocation_time(os::javaTimeNanos());
315 }
316
317 #endif // GRAALVM
318 306
319 // increment invocation count & check for overflow 307 // increment invocation count & check for overflow
320 // 308 //
321 // Note: checking for negative value instead of overflow 309 // Note: checking for negative value instead of overflow
322 // so we have a 'sticky' overflow test 310 // so we have a 'sticky' overflow test
367 if (ProfileInterpreter) { 355 if (ProfileInterpreter) {
368 __ incrementl(Address(rax, 356 __ incrementl(Address(rax,
369 MethodCounters::interpreter_invocation_counter_offset())); 357 MethodCounters::interpreter_invocation_counter_offset()));
370 } 358 }
371 359
372 #ifdef GRAALVM
373 if (CompilationPolicyChoice == 4) {
374 Label not_zero;
375 __ testl(rcx, InvocationCounter::count_mask_value);
376 __ jcc(Assembler::notZero, not_zero);
377
378 __ push(rax);
379 __ push(rcx);
380 __ call_VM(noreg, CAST_FROM_FN_PTR(address, graal_initialize_time), rdx, false);
381 __ set_method_data_pointer_for_bcp();
382 __ get_method(rbx);
383 __ pop(rcx);
384 __ pop(rax);
385
386 #ifdef ASSERT
387 __ testl(rcx, InvocationCounter::count_mask_value);
388 __ jcc(Assembler::zero, not_zero);
389 __ stop("unexpected counter value in rcx");
390 #endif
391
392 __ bind(not_zero);
393 }
394 #endif // GRAALVM
395
396 // Update standard invocation counters 360 // Update standard invocation counters
397 __ movl(rcx, invocation_counter); 361 __ movl(rcx, invocation_counter);
398 __ incrementl(rcx, InvocationCounter::count_increment); 362 __ incrementl(rcx, InvocationCounter::count_increment);
399 __ movl(invocation_counter, rcx); // save invocation count 363 __ movl(invocation_counter, rcx); // save invocation count
400 364