https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64206

--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Fri Jan  9 17:01:04 2015
New Revision: 219395

URL: https://gcc.gnu.org/viewcvs?rev=219395&root=gcc&view=rev
Log:
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.


Modified:
    trunk/gcc/jit/ChangeLog
    trunk/gcc/jit/docs/_build/texinfo/libgccjit.texi
    trunk/gcc/jit/docs/internals/test-hello-world.exe.log.txt
    trunk/gcc/jit/jit-logging.h
    trunk/gcc/jit/jit-playback.c
    trunk/gcc/jit/jit-result.c
    trunk/gcc/jit/jit-result.h
    trunk/gcc/jit/jit-tempdir.c
    trunk/gcc/jit/jit-tempdir.h
    trunk/gcc/jit/notes.txt

Reply via email to