Fill up {,un}compression stats for ZSTD in LTO.
authorMartin Liska <mliska@suse.cz>
Wed, 20 May 2020 12:39:21 +0000 (14:39 +0200)
committerMartin Liska <mliska@suse.cz>
Wed, 20 May 2020 12:39:21 +0000 (14:39 +0200)
* lto-compress.c (lto_compression_zstd): Fill up
num_compressed_il_bytes.
(lto_uncompression_zstd): Likewise for num_uncompressed_il_bytes here.

gcc/ChangeLog
gcc/lto-compress.c

index 88b03be713539a96ed05f82662b3856b9cf57f23..2fe9f0dfdf58e6180497373c043084cba7f597d4 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-20  Martin Liska  <mliska@suse.cz>
+
+       * lto-compress.c (lto_compression_zstd): Fill up
+       num_compressed_il_bytes.
+       (lto_uncompression_zstd): Likewise for num_uncompressed_il_bytes here.
+
 2020-05-20  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/95219
index 56cd9626b1902b1d4582c3cd91ae113c634b7a0a..d19338b396a39bae12a72664f9900ee0e19599b4 100644 (file)
@@ -141,6 +141,7 @@ lto_compression_zstd (struct lto_compression_stream *stream)
   if (ZSTD_isError (csize))
     internal_error ("compressed stream: %s", ZSTD_getErrorName (csize));
 
+  lto_stats.num_compressed_il_bytes += csize;
   stream->callback (outbuf, csize, NULL);
 
   lto_destroy_compression_stream (stream);
@@ -169,6 +170,7 @@ lto_uncompression_zstd (struct lto_compression_stream *stream)
   if (ZSTD_isError (dsize))
     internal_error ("decompressed stream: %s", ZSTD_getErrorName (dsize));
 
+  lto_stats.num_uncompressed_il_bytes += dsize;
   stream->callback (outbuf, dsize, stream->opaque);
 
   lto_destroy_compression_stream (stream);