Mercurial > hg > graal-compiler
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.cpp Fri Oct 31 11:25:32 2014 -0700 +++ b/src/share/vm/code/dependencies.cpp Fri Oct 31 12:20:56 2014 -0700 @@ -125,9 +125,9 @@ #ifdef GRAAL -Dependencies::Dependencies(Arena* arena, OopRecorder* oop_recorder) { +Dependencies::Dependencies(Arena* arena, OopRecorder* oop_recorder, CompileLog* log) { _oop_recorder = oop_recorder; - _log = NULL; + _log = log; _dep_seen = new(arena) GrowableArray<int>(arena, 500, 0, 0); _using_dep_values = true; DEBUG_ONLY(_dep_values[end_marker] = NULL); @@ -792,8 +792,14 @@ } } if (_deps != NULL && _deps->log() != NULL) { - Dependencies::write_dependency_to(_deps->log(), - type(), nargs, args, witness); + if (ciEnv::current() != NULL) { + Dependencies::write_dependency_to(_deps->log(), + type(), nargs, args, witness); + } else { + // Treat the CompileLog as an xmlstream instead + Dependencies::write_dependency_to((xmlStream*)_deps->log(), + type(), nargs, args, witness); + } } else { Dependencies::write_dependency_to(xtty, type(), nargs, args, witness);