summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 20:00:47 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 20:00:47 +0000
commitc1183ec8af5ab7cb8f1b4701f953570a5842d3ae (patch)
tree458ee9ffb9bb3ad9069cde9a08ca71c1b3a9d60d
parent17131f96d47659189114b41b88ef05cb654442bc (diff)
downloadgcc-c1183ec8af5ab7cb8f1b4701f953570a5842d3ae.tar.gz
* timevar.def (TV_IPA_LTO_DECOMPRESS, TV_IPA_LTO_COMPRESS,
TV_IPA_LTO_OUTPUT): New. * lto-compress.c: Include timevar.h (lto_end_compression, lto_end_uncompression): Add timers. * langhooks.c: Include timevar.h (lhd_append_data): Add timer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230902 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/langhooks.c7
-rw-r--r--gcc/lto-compress.c6
-rw-r--r--gcc/timevar.def3
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9ee04518fcb..2950141066c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2015-11-25 Jan Hubicka <hubicka@ucw.cz>
+ * timevar.def (TV_IPA_LTO_DECOMPRESS, TV_IPA_LTO_COMPRESS,
+ TV_IPA_LTO_OUTPUT): New.
+ * lto-compress.c: Include timevar.h
+ (lto_end_compression, lto_end_uncompression): Add timers.
+ * langhooks.c: Include timevar.h
+ (lhd_append_data): Add timer.
+
+2015-11-25 Jan Hubicka <hubicka@ucw.cz>
+
* varasm.c (default_elf_asm_output_limited_string,
default_elf_asm_output_ascii): Replace fprintf by putc.
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index e7d9ae1d303..9d4f331fc48 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "tree-diagnostic.h"
#include "output.h"
+#include "timevar.h"
/* Do nothing; in many cases the default hook. */
@@ -658,7 +659,11 @@ void
lhd_append_data (const void *data, size_t len, void *)
{
if (data)
- assemble_string ((const char *)data, len);
+ {
+ timevar_push (TV_IPA_LTO_OUTPUT);
+ assemble_string ((const char *)data, len);
+ timevar_pop (TV_IPA_LTO_OUTPUT);
+ }
}
diff --git a/gcc/lto-compress.c b/gcc/lto-compress.c
index 7d758ecb7c8..204ca419d74 100644
--- a/gcc/lto-compress.c
+++ b/gcc/lto-compress.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
system.h. */
#include <zlib.h>
#include "lto-compress.h"
+#include "timevar.h"
/* Compression stream structure, holds the flush callback and opaque token,
the buffered data, and a note of whether compressing or uncompressing. */
@@ -177,6 +178,8 @@ lto_end_compression (struct lto_compression_stream *stream)
gcc_assert (stream->is_compression);
+ timevar_push (TV_IPA_LTO_COMPRESS);
+
out_stream.next_out = outbuf;
out_stream.avail_out = outbuf_length;
out_stream.next_in = cursor;
@@ -220,6 +223,7 @@ lto_end_compression (struct lto_compression_stream *stream)
lto_destroy_compression_stream (stream);
free (outbuf);
+ timevar_pop (TV_IPA_LTO_COMPRESS);
}
/* Return a new uncompression stream, with CALLBACK flush function passed
@@ -260,6 +264,7 @@ lto_end_uncompression (struct lto_compression_stream *stream)
size_t uncompressed_bytes = 0;
gcc_assert (!stream->is_compression);
+ timevar_push (TV_IPA_LTO_DECOMPRESS);
while (remaining > 0)
{
@@ -311,4 +316,5 @@ lto_end_uncompression (struct lto_compression_stream *stream)
lto_destroy_compression_stream (stream);
free (outbuf);
+ timevar_pop (TV_IPA_LTO_DECOMPRESS);
}
diff --git a/gcc/timevar.def b/gcc/timevar.def
index 45e3b709af1..535597fcbb1 100644
--- a/gcc/timevar.def
+++ b/gcc/timevar.def
@@ -79,6 +79,9 @@ DEFTIMEVAR (TV_IPA_INLINING , "ipa inlining heuristics")
DEFTIMEVAR (TV_IPA_FNSPLIT , "ipa function splitting")
DEFTIMEVAR (TV_IPA_COMDATS , "ipa comdats")
DEFTIMEVAR (TV_IPA_OPT , "ipa various optimizations")
+DEFTIMEVAR (TV_IPA_LTO_DECOMPRESS , "lto stream inflate")
+DEFTIMEVAR (TV_IPA_LTO_COMPRESS , "lto stream deflate")
+DEFTIMEVAR (TV_IPA_LTO_OUTPUT , "lto stream output")
DEFTIMEVAR (TV_IPA_LTO_GIMPLE_IN , "ipa lto gimple in")
DEFTIMEVAR (TV_IPA_LTO_GIMPLE_OUT , "ipa lto gimple out")
DEFTIMEVAR (TV_IPA_LTO_DECL_IN , "ipa lto decl in")