diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-01-27 20:19:36 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-01-27 20:19:36 +0000 |
commit | 53c04ec92a37b35a7f37e00bd5a4b611cf470e3c (patch) | |
tree | c8823405a2ab3de543e96e14ffc83037629e01f9 /gcc/jit | |
parent | 710700abb804afc0846423ab246034dec745a599 (diff) | |
download | gcc-53c04ec92a37b35a7f37e00bd5a4b611cf470e3c.zip gcc-53c04ec92a37b35a7f37e00bd5a4b611cf470e3c.tar.gz gcc-53c04ec92a37b35a7f37e00bd5a4b611cf470e3c.tar.bz2 |
toplev: gcc version information for jit
gcc/ChangeLog:
* toplev.c (print_version): Add param "show_global_state", and
only print GGC and plugin information if it is true.
(init_asm_output): Pass in "true" for the new param when calling
print_version.
(process_options): Likewise.
(toplev::main): Likewise.
* toplev.h (print_version): Add new param to decl.
gcc/jit/ChangeLog:
* docs/internals/test-hello-world.exe.log.txt: Add example version
lines.
* jit-common.h (gcc::jit::dump::get_file): New accessor.
* jit-logging.c: Include toplev.h.
(gcc::jit::logger::logger): Log the GCC version.
* jit-recording.c: Include toplev.h.
(gcc:jit::recording::context::dump_reproducer_to_file): Log the
GCC version.
From-SVN: r220190
Diffstat (limited to 'gcc/jit')
-rw-r--r-- | gcc/jit/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/jit/docs/_build/texinfo/libgccjit.texi | 4 | ||||
-rw-r--r-- | gcc/jit/docs/internals/test-hello-world.exe.log.txt | 2 | ||||
-rw-r--r-- | gcc/jit/jit-common.h | 2 | ||||
-rw-r--r-- | gcc/jit/jit-logging.c | 3 | ||||
-rw-r--r-- | gcc/jit/jit-recording.c | 5 |
6 files changed, 26 insertions, 2 deletions
diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog index 577712c..a260ab0 100644 --- a/gcc/jit/ChangeLog +++ b/gcc/jit/ChangeLog @@ -1,3 +1,15 @@ +2015-01-27 David Malcolm <dmalcolm@redhat.com> + + * docs/internals/test-hello-world.exe.log.txt: Add example version + lines. + * docs/_build/texinfo/libgccjit.texi: Regenerate. + * jit-common.h (gcc::jit::dump::get_file): New accessor. + * jit-logging.c: Include toplev.h. + (gcc::jit::logger::logger): Log the GCC version. + * jit-recording.c: Include toplev.h. + (gcc:jit::recording::context::dump_reproducer_to_file): Log the + GCC version. + 2015-01-26 David Malcolm <dmalcolm@redhat.com> * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo. diff --git a/gcc/jit/docs/_build/texinfo/libgccjit.texi b/gcc/jit/docs/_build/texinfo/libgccjit.texi index 3c32499..37c4664 100644 --- a/gcc/jit/docs/_build/texinfo/libgccjit.texi +++ b/gcc/jit/docs/_build/texinfo/libgccjit.texi @@ -19,7 +19,7 @@ @copying @quotation -libgccjit 5.0.0 (experimental 20150126), January 26, 2015 +libgccjit 5.0.0 (experimental 20150127), January 27, 2015 David Malcolm @@ -13753,6 +13753,8 @@ via @pxref{5b,,gcc_jit_context_set_logfile()}. Here is an example of a log generated via this call: @example +JIT: libgccjit (GCC) version 5.0.0 20150123 (experimental) (x86_64-unknown-linux-gnu) +JIT: compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.1 JIT: entering: gcc_jit_context_set_str_option JIT: exiting: gcc_jit_context_set_str_option JIT: entering: gcc_jit_context_set_int_option 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 205b6b4..876d830 100644 --- a/gcc/jit/docs/internals/test-hello-world.exe.log.txt +++ b/gcc/jit/docs/internals/test-hello-world.exe.log.txt @@ -1,3 +1,5 @@ +JIT: libgccjit (GCC) version 5.0.0 20150123 (experimental) (x86_64-unknown-linux-gnu) +JIT: compiled by GNU C version 4.8.3 20140911 (Red Hat 4.8.3-7), GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.1 JIT: entering: gcc_jit_context_set_str_option JIT: exiting: gcc_jit_context_set_str_option JIT: entering: gcc_jit_context_set_int_option diff --git a/gcc/jit/jit-common.h b/gcc/jit/jit-common.h index 09d63ba..8753651 100644 --- a/gcc/jit/jit-common.h +++ b/gcc/jit/jit-common.h @@ -178,6 +178,8 @@ public: recording::location * make_location () const; + FILE *get_file () const { return m_file; } + private: recording::context &m_ctxt; const char *m_filename; diff --git a/gcc/jit/jit-logging.c b/gcc/jit/jit-logging.c index 61b898b..22ab6fd 100644 --- a/gcc/jit/jit-logging.c +++ b/gcc/jit/jit-logging.c @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "toplev.h" /* for print_version */ #include "jit-logging.h" @@ -41,6 +42,8 @@ logger::logger (FILE *f_out, m_indent_level (0), m_log_refcount_changes (false) { + /* Begin the log by writing the GCC version. */ + print_version (f_out, "JIT:", false); } /* The destructor for gcc::jit::logger, invoked via diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c index 1077f27..9f6e5fd 100644 --- a/gcc/jit/jit-recording.c +++ b/gcc/jit/jit-recording.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "tm.h" #include "pretty-print.h" #include "hash-map.h" +#include "toplev.h" #include <pthread.h> @@ -1414,7 +1415,9 @@ recording::context::dump_reproducer_to_file (const char *path) == contexts[0]); r.write ("/* This code was autogenerated by" - " gcc_jit_context_dump_reproducer_to_file. */\n\n"); + " gcc_jit_context_dump_reproducer_to_file.\n\n"); + print_version (r.get_file (), " ", false); + r.write ("*/\n"); r.write ("#include <libgccjit.h>\n\n"); r.write ("static void\nset_options ("); r.write_params (contexts); |