Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index 46d23da1ceadf50b574d26265b6d50eb76840a6c..895b9849c97d36c16bb6ecdbd6c93f1eb951eb2c 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -2085,10 +2085,14 @@ class HTracer: public Malloced { |
public: |
explicit HTracer(int isolate_id) |
: trace_(&string_allocator_), indent_(0) { |
- OS::SNPrintF(filename_, |
- "hydrogen-%d-%d.cfg", |
- OS::GetCurrentProcessId(), |
- isolate_id); |
+ if (FLAG_trace_hydrogen_file == NULL) { |
+ OS::SNPrintF(filename_, |
+ "hydrogen-%d-%d.cfg", |
+ OS::GetCurrentProcessId(), |
+ isolate_id); |
+ } else { |
+ OS::StrNCpy(filename_, FLAG_trace_hydrogen_file, filename_.length()); |
+ } |
WriteChars(filename_.start(), "", 0, false); |
} |