src/share/vm/code/dependencies.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6614597 Sdiff src/share/vm/code

src/share/vm/code/dependencies.cpp

Print this page




 826 #ifndef PRODUCT
 827 static int deps_find_witness_calls = 0;
 828 static int deps_find_witness_steps = 0;
 829 static int deps_find_witness_recursions = 0;
 830 static int deps_find_witness_singles = 0;
 831 static int deps_find_witness_print = 0; // set to -1 to force a final print
 832 static bool count_find_witness_calls() {
 833   if (TraceDependencies || LogCompilation) {
 834     int pcount = deps_find_witness_print + 1;
 835     bool final_stats      = (pcount == 0);
 836     bool initial_call     = (pcount == 1);
 837     bool occasional_print = ((pcount & ((1<<10) - 1)) == 0);
 838     if (pcount < 0)  pcount = 1; // crude overflow protection
 839     deps_find_witness_print = pcount;
 840     if (VerifyDependencies && initial_call) {
 841       tty->print_cr("Warning:  TraceDependencies results may be inflated by VerifyDependencies");
 842     }
 843     if (occasional_print || final_stats) {
 844       // Every now and then dump a little info about dependency searching.
 845       if (xtty != NULL) {

 846         xtty->elem("deps_find_witness calls='%d' steps='%d' recursions='%d' singles='%d'",
 847                    deps_find_witness_calls,
 848                    deps_find_witness_steps,
 849                    deps_find_witness_recursions,
 850                    deps_find_witness_singles);
 851       }
 852       if (final_stats || (TraceDependencies && WizardMode)) {

 853         tty->print_cr("Dependency check (find_witness) "
 854                       "calls=%d, steps=%d (avg=%.1f), recursions=%d, singles=%d",
 855                       deps_find_witness_calls,
 856                       deps_find_witness_steps,
 857                       (double)deps_find_witness_steps / deps_find_witness_calls,
 858                       deps_find_witness_recursions,
 859                       deps_find_witness_singles);
 860       }
 861     }
 862     return true;
 863   }
 864   return false;
 865 }
 866 #else
 867 #define count_find_witness_calls() (0)
 868 #endif //PRODUCT
 869 
 870 
 871 klassOop ClassHierarchyWalker::find_witness_in(DepChange& changes,
 872                                                klassOop context_type,




 826 #ifndef PRODUCT
 827 static int deps_find_witness_calls = 0;
 828 static int deps_find_witness_steps = 0;
 829 static int deps_find_witness_recursions = 0;
 830 static int deps_find_witness_singles = 0;
 831 static int deps_find_witness_print = 0; // set to -1 to force a final print
 832 static bool count_find_witness_calls() {
 833   if (TraceDependencies || LogCompilation) {
 834     int pcount = deps_find_witness_print + 1;
 835     bool final_stats      = (pcount == 0);
 836     bool initial_call     = (pcount == 1);
 837     bool occasional_print = ((pcount & ((1<<10) - 1)) == 0);
 838     if (pcount < 0)  pcount = 1; // crude overflow protection
 839     deps_find_witness_print = pcount;
 840     if (VerifyDependencies && initial_call) {
 841       tty->print_cr("Warning:  TraceDependencies results may be inflated by VerifyDependencies");
 842     }
 843     if (occasional_print || final_stats) {
 844       // Every now and then dump a little info about dependency searching.
 845       if (xtty != NULL) {
 846        ttyLocker ttyl;
 847        xtty->elem("deps_find_witness calls='%d' steps='%d' recursions='%d' singles='%d'",
 848                    deps_find_witness_calls,
 849                    deps_find_witness_steps,
 850                    deps_find_witness_recursions,
 851                    deps_find_witness_singles);
 852       }
 853       if (final_stats || (TraceDependencies && WizardMode)) {
 854         ttyLocker ttyl;
 855         tty->print_cr("Dependency check (find_witness) "
 856                       "calls=%d, steps=%d (avg=%.1f), recursions=%d, singles=%d",
 857                       deps_find_witness_calls,
 858                       deps_find_witness_steps,
 859                       (double)deps_find_witness_steps / deps_find_witness_calls,
 860                       deps_find_witness_recursions,
 861                       deps_find_witness_singles);
 862       }
 863     }
 864     return true;
 865   }
 866   return false;
 867 }
 868 #else
 869 #define count_find_witness_calls() (0)
 870 #endif //PRODUCT
 871 
 872 
 873 klassOop ClassHierarchyWalker::find_witness_in(DepChange& changes,
 874                                                klassOop context_type,


src/share/vm/code/dependencies.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File