From: Alex Coyte Date: Wed, 29 Jun 2016 23:57:18 +0000 (+1000) Subject: compiledump: allow disabling of early graphs for large compiles X-Git-Tag: v4.3.0^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b13a90e5d2122225d87f79bcede5235984d5e760;p=thirdparty%2Fvectorscan.git compiledump: allow disabling of early graphs for large compiles --- diff --git a/src/rose/rose_build_dump.cpp b/src/rose/rose_build_dump.cpp index 5e176c30..a33e653a 100644 --- a/src/rose/rose_build_dump.cpp +++ b/src/rose/rose_build_dump.cpp @@ -273,14 +273,18 @@ void dumpRoseGraph(const RoseBuild &build_base, const RoseEngine *t, const RoseBuildImpl &build = dynamic_cast(build_base); const Grey &grey = build.cc.grey; - if (!grey.dumpFlags) { + + /* "early" rose graphs should only be dumped if we are dumping intermediate + * graphs. Early graphs can be identified by the lack of a RoseEngine. */ + u32 flag_test = t ? Grey::DUMP_IMPL : Grey::DUMP_INT_GRAPH; + + if (!(grey.dumpFlags & flag_test)) { return; } stringstream ss; ss << grey.dumpPath << filename; - DEBUG_PRINTF("dumping graph to %s\n", ss.str().c_str()); ofstream os(ss.str()); diff --git a/src/rose/rose_in_dump.cpp b/src/rose/rose_in_dump.cpp index 899e50c4..97aefdc4 100644 --- a/src/rose/rose_in_dump.cpp +++ b/src/rose/rose_in_dump.cpp @@ -51,7 +51,7 @@ namespace ue2 { void dumpPreRoseGraph(const RoseInGraph &ig, const Grey &grey, const char *filename) { - if (!grey.dumpFlags) { + if (!(grey.dumpFlags & Grey::DUMP_INT_GRAPH)) { return; }