Mercurial > hg > truffle
comparison src/share/vm/ci/ciEnv.cpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | e0ba4e04c839 |
children | 2d26b0046e0d f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1782:f353275af40e | 1783:d5d065957597 |
---|---|
954 // Record successful registration. | 954 // Record successful registration. |
955 // (Put nm into the task handle *before* publishing to the Java heap.) | 955 // (Put nm into the task handle *before* publishing to the Java heap.) |
956 if (task() != NULL) task()->set_code(nm); | 956 if (task() != NULL) task()->set_code(nm); |
957 | 957 |
958 if (entry_bci == InvocationEntryBci) { | 958 if (entry_bci == InvocationEntryBci) { |
959 #ifdef TIERED | 959 if (TieredCompilation) { |
960 // If there is an old version we're done with it | 960 // If there is an old version we're done with it |
961 nmethod* old = method->code(); | 961 nmethod* old = method->code(); |
962 if (TraceMethodReplacement && old != NULL) { | 962 if (TraceMethodReplacement && old != NULL) { |
963 ResourceMark rm; | 963 ResourceMark rm; |
964 char *method_name = method->name_and_sig_as_C_string(); | 964 char *method_name = method->name_and_sig_as_C_string(); |
965 tty->print_cr("Replacing method %s", method_name); | 965 tty->print_cr("Replacing method %s", method_name); |
966 } | |
967 if (old != NULL ) { | |
968 old->make_not_entrant(); | |
969 } | |
966 } | 970 } |
967 if (old != NULL ) { | |
968 old->make_not_entrant(); | |
969 } | |
970 #endif // TIERED | |
971 if (TraceNMethodInstalls ) { | 971 if (TraceNMethodInstalls ) { |
972 ResourceMark rm; | 972 ResourceMark rm; |
973 char *method_name = method->name_and_sig_as_C_string(); | 973 char *method_name = method->name_and_sig_as_C_string(); |
974 ttyLocker ttyl; | 974 ttyLocker ttyl; |
975 tty->print_cr("Installing method (%d) %s ", | 975 tty->print_cr("Installing method (%d) %s ", |
1009 } | 1009 } |
1010 | 1010 |
1011 // ------------------------------------------------------------------ | 1011 // ------------------------------------------------------------------ |
1012 // ciEnv::comp_level | 1012 // ciEnv::comp_level |
1013 int ciEnv::comp_level() { | 1013 int ciEnv::comp_level() { |
1014 if (task() == NULL) return CompLevel_full_optimization; | 1014 if (task() == NULL) return CompLevel_highest_tier; |
1015 return task()->comp_level(); | 1015 return task()->comp_level(); |
1016 } | 1016 } |
1017 | 1017 |
1018 // ------------------------------------------------------------------ | 1018 // ------------------------------------------------------------------ |
1019 // ciEnv::compile_id | 1019 // ciEnv::compile_id |