aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/docs/internals
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-01-09 17:01:04 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-01-09 17:01:04 +0000
commitd2286af3d3fe908f84957406aba98eefd1f6e05e (patch)
tree6c908a45d62d11096d3b5ae2fb3675716fcbf926 /gcc/jit/docs/internals
parent4c470097be7b403c8b424c703144b03a88f22b3b (diff)
downloadgcc-d2286af3d3fe908f84957406aba98eefd1f6e05e.zip
gcc-d2286af3d3fe908f84957406aba98eefd1f6e05e.tar.gz
gcc-d2286af3d3fe908f84957406aba98eefd1f6e05e.tar.bz2
PR jit/64206: delay cleanup of tempdir if the user has requested debuginfo
gcc/jit/ChangeLog: PR jit/64206 * docs/internals/test-hello-world.exe.log.txt: Update, the log now shows tempdir creation/cleanup. * docs/_build/texinfo/libgccjit.texi: Regenerate. * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir to the list of subclasses in the comment. * jit-playback.c (gcc::jit::playback::context::context): Add a comment clarifying when the tempdir gets cleaned up. (gcc::jit::playback::context::compile): Pass the context's logger, if any, to the tempdir. (gcc::jit::playback::context::dlopen_built_dso): When creating the gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand over ownership of the tempdir to it. * jit-result.c: Include "jit-tempdir.h". (gcc::jit::result::result): Add tempdir param, saving it as m_tempdir. (gcc::jit::result::~result): Delete m_tempdir. * jit-result.h (gcc::jit::result::result): Add tempdir param. (gcc::jit::result::m_tempdir): New field. * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param; add JIT_LOG_SCOPE. (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit, and log m_path_template and m_path_tempdir. (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log entry/exit, and log the unlink and rmdir calls. * jit-tempdir.h: Include "jit-logging.h". (class gcc::jit::tempdir): Make this be a subclass of log_user. (gcc::jit::tempdir::tempdir): Add logger param. * notes.txt: Update to show the two possible places where the tempdir can be cleaned up. From-SVN: r219395
Diffstat (limited to 'gcc/jit/docs/internals')
-rw-r--r--gcc/jit/docs/internals/test-hello-world.exe.log.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/jit/docs/internals/test-hello-world.exe.log.txt b/gcc/jit/docs/internals/test-hello-world.exe.log.txt
index a96d80f..113dc35 100644
--- a/gcc/jit/docs/internals/test-hello-world.exe.log.txt
+++ b/gcc/jit/docs/internals/test-hello-world.exe.log.txt
@@ -46,6 +46,12 @@ JIT: exiting: void gcc::jit::recording::context::validate()
JIT: entering: gcc::jit::playback::context::context(gcc::jit::recording::context*)
JIT: exiting: gcc::jit::playback::context::context(gcc::jit::recording::context*)
JIT: entering: gcc::jit::result* gcc::jit::playback::context::compile()
+JIT: entering: gcc::jit::tempdir::tempdir(gcc::jit::logger*, int)
+JIT: exiting: gcc::jit::tempdir::tempdir(gcc::jit::logger*, int)
+JIT: entering: bool gcc::jit::tempdir::create()
+JIT: m_path_template: /tmp/libgccjit-XXXXXX
+JIT: m_path_tempdir: /tmp/libgccjit-CKq1M9
+JIT: exiting: bool gcc::jit::tempdir::create()
JIT: entering: void gcc::jit::playback::context::make_fake_args(vec<char*>*, const char*, vec<gcc::jit::recording::requested_dump>*)
JIT: exiting: void gcc::jit::playback::context::make_fake_args(vec<char*>*, const char*, vec<gcc::jit::recording::requested_dump>*)
JIT: entering: void gcc::jit::playback::context::acquire_mutex()
@@ -96,8 +102,9 @@ JIT: argv[5]: -fno-use-linker-plugin
JIT: argv[6]: (null)
JIT: exiting: void gcc::jit::playback::context::convert_to_dso(const char*)
JIT: entering: gcc::jit::result* gcc::jit::playback::context::dlopen_built_dso()
-JIT: entering: gcc::jit::result::result(gcc::jit::logger*, void*)
-JIT: exiting: gcc::jit::result::result(gcc::jit::logger*, void*)
+JIT: GCC_JIT_BOOL_OPTION_DEBUGINFO was set: handing over tempdir to jit::result
+JIT: entering: gcc::jit::result::result(gcc::jit::logger*, void*, gcc::jit::tempdir*)
+JIT: exiting: gcc::jit::result::result(gcc::jit::logger*, void*, gcc::jit::tempdir*)
JIT: exiting: gcc::jit::result* gcc::jit::playback::context::dlopen_built_dso()
JIT: entering: void gcc::jit::playback::context::release_mutex()
JIT: exiting: void gcc::jit::playback::context::release_mutex()
@@ -121,6 +128,11 @@ JIT: exiting: gcc_jit_context_release
JIT: entering: gcc_jit_result_release
JIT: deleting result: 0x12f75d0
JIT: entering: virtual gcc::jit::result::~result()
+JIT: entering: gcc::jit::tempdir::~tempdir()
+JIT: unlinking .s file: /tmp/libgccjit-CKq1M9/fake.s
+JIT: unlinking .so file: /tmp/libgccjit-CKq1M9/fake.so
+JIT: removing tempdir: /tmp/libgccjit-CKq1M9
+JIT: exiting: gcc::jit::tempdir::~tempdir()
JIT: exiting: virtual gcc::jit::result::~result()
JIT: exiting: gcc_jit_result_release
JIT: gcc::jit::logger::~logger()