Mercurial > hg > graal-compiler
comparison src/share/vm/code/dependencies.cpp @ 18226:6eda3b299460
Record compilation dependencies with +LogCompilation
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 31 Oct 2014 12:20:56 -0700 |
parents | 52b4284cb496 |
children | dd8989d5547f |
comparison
equal
deleted
inserted
replaced
18225:40074f6ac788 | 18226:6eda3b299460 |
---|---|
123 assert_common_2(call_site_target_value, call_site, method_handle); | 123 assert_common_2(call_site_target_value, call_site, method_handle); |
124 } | 124 } |
125 | 125 |
126 #ifdef GRAAL | 126 #ifdef GRAAL |
127 | 127 |
128 Dependencies::Dependencies(Arena* arena, OopRecorder* oop_recorder) { | 128 Dependencies::Dependencies(Arena* arena, OopRecorder* oop_recorder, CompileLog* log) { |
129 _oop_recorder = oop_recorder; | 129 _oop_recorder = oop_recorder; |
130 _log = NULL; | 130 _log = log; |
131 _dep_seen = new(arena) GrowableArray<int>(arena, 500, 0, 0); | 131 _dep_seen = new(arena) GrowableArray<int>(arena, 500, 0, 0); |
132 _using_dep_values = true; | 132 _using_dep_values = true; |
133 DEBUG_ONLY(_dep_values[end_marker] = NULL); | 133 DEBUG_ONLY(_dep_values[end_marker] = NULL); |
134 for (int i = (int)FIRST_TYPE; i < (int)TYPE_LIMIT; i++) { | 134 for (int i = (int)FIRST_TYPE; i < (int)TYPE_LIMIT; i++) { |
135 _dep_values[i] = new(arena) GrowableArray<DepValue>(arena, 10, 0, DepValue()); | 135 _dep_values[i] = new(arena) GrowableArray<DepValue>(arena, 10, 0, DepValue()); |
790 } else { | 790 } else { |
791 args[j] = argument(j); | 791 args[j] = argument(j); |
792 } | 792 } |
793 } | 793 } |
794 if (_deps != NULL && _deps->log() != NULL) { | 794 if (_deps != NULL && _deps->log() != NULL) { |
795 Dependencies::write_dependency_to(_deps->log(), | 795 if (ciEnv::current() != NULL) { |
796 type(), nargs, args, witness); | 796 Dependencies::write_dependency_to(_deps->log(), |
797 type(), nargs, args, witness); | |
798 } else { | |
799 // Treat the CompileLog as an xmlstream instead | |
800 Dependencies::write_dependency_to((xmlStream*)_deps->log(), | |
801 type(), nargs, args, witness); | |
802 } | |
797 } else { | 803 } else { |
798 Dependencies::write_dependency_to(xtty, | 804 Dependencies::write_dependency_to(xtty, |
799 type(), nargs, args, witness); | 805 type(), nargs, args, witness); |
800 } | 806 } |
801 } | 807 } |