Mercurial > hg > truffle
comparison src/share/vm/code/nmethod.cpp @ 19729:f8147c931ce4
Add PrintNMethodsAtLevel option to hotspot
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 09 Mar 2015 12:43:19 -0700 |
parents | f3eed864acdc |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
19728:f3eed864acdc | 19729:f8147c931ce4 |
---|---|
854 } | 854 } |
855 DEBUG_ONLY(verify_scavenge_root_oops();) | 855 DEBUG_ONLY(verify_scavenge_root_oops();) |
856 CodeCache::commit(this); | 856 CodeCache::commit(this); |
857 } | 857 } |
858 | 858 |
859 if (PrintNMethods || PrintDebugInfo || PrintRelocations || PrintDependencies) { | 859 bool printnmethods = PrintNMethods || PrintNMethodsAtLevel == _comp_level; |
860 if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies) { | |
860 ttyLocker ttyl; // keep the following output all in one block | 861 ttyLocker ttyl; // keep the following output all in one block |
861 // This output goes directly to the tty, not the compiler log. | 862 // This output goes directly to the tty, not the compiler log. |
862 // To enable tools to match it up with the compilation activity, | 863 // To enable tools to match it up with the compilation activity, |
863 // be sure to tag this tty output with the compile ID. | 864 // be sure to tag this tty output with the compile ID. |
864 if (xtty != NULL) { | 865 if (xtty != NULL) { |
868 xtty->end_head(" address='" INTPTR_FORMAT "'", (intptr_t) this); | 869 xtty->end_head(" address='" INTPTR_FORMAT "'", (intptr_t) this); |
869 } | 870 } |
870 // print the header part first | 871 // print the header part first |
871 print(); | 872 print(); |
872 // then print the requested information | 873 // then print the requested information |
873 if (PrintNMethods) { | 874 if (printnmethods) { |
874 print_code(); | 875 print_code(); |
875 } | 876 } |
876 if (PrintRelocations) { | 877 if (PrintRelocations) { |
877 print_relocations(); | 878 print_relocations(); |
878 } | 879 } |
1012 assert(compiler->is_c2() || compiler->is_graal() || | 1013 assert(compiler->is_c2() || compiler->is_graal() || |
1013 _method->is_static() == (entry_point() == _verified_entry_point), | 1014 _method->is_static() == (entry_point() == _verified_entry_point), |
1014 " entry points must be same for static methods and vice versa"); | 1015 " entry points must be same for static methods and vice versa"); |
1015 } | 1016 } |
1016 | 1017 |
1017 bool printnmethods = PrintNMethods | 1018 bool printnmethods = PrintNMethods || PrintNMethodsAtLevel == _comp_level |
1018 || CompilerOracle::should_print(_method) | 1019 || CompilerOracle::should_print(_method) |
1019 || CompilerOracle::has_option_string(_method, "PrintNMethods"); | 1020 || CompilerOracle::has_option_string(_method, "PrintNMethods"); |
1020 if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) { | 1021 if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) { |
1021 print_nmethod(printnmethods); | 1022 print_nmethod(printnmethods); |
1022 } | 1023 } |