diff options
author | Martin Liska <mliska@suse.cz> | 2021-02-16 16:28:06 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-03-04 16:21:52 +0100 |
commit | 6a8fc0c31a9ae759fe9bf59b5418abf2af938f91 (patch) | |
tree | d0f65e009207e8142f7e5882e2c9e059c3e1b6b8 /gcc | |
parent | c9816196328a4f4b927f08cf2f66cf255849da0b (diff) | |
download | gcc-6a8fc0c31a9ae759fe9bf59b5418abf2af938f91.zip gcc-6a8fc0c31a9ae759fe9bf59b5418abf2af938f91.tar.gz gcc-6a8fc0c31a9ae759fe9bf59b5418abf2af938f91.tar.bz2 |
profiling: fix streaming of TOPN counters
libgcc/ChangeLog:
PR gcov-profile/99105
* libgcov-driver.c (write_top_counters): Rename to ...
(write_topn_counters): ... this.
(write_one_data): Pre-allocate buffer for number of items
in the corresponding linked lists.
* libgcov.h (malloc_mmap): New function.
(allocate_gcov_kvp): Use it.
gcc/testsuite/ChangeLog:
PR gcov-profile/99105
* gcc.dg/tree-prof/indir-call-prof-malloc.c: Use profile
correction as the wrapped malloc is called one more time
from libgcov.
* gcc.dg/tree-prof/pr97461.c: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-malloc.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/pr97461.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-malloc.c b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-malloc.c index 454e224..7bda4ae 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-malloc.c +++ b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof-malloc.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -ldl" } */ +/* { dg-options "-O2 -ldl -fprofile-correction" } */ #define _GNU_SOURCE #include <stdio.h> diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr97461.c b/gcc/testsuite/gcc.dg/tree-prof/pr97461.c index 213fac9..f684be4d 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/pr97461.c +++ b/gcc/testsuite/gcc.dg/tree-prof/pr97461.c @@ -1,5 +1,5 @@ /* PR gcov-profile/97461 */ -/* { dg-options "-O2 -ldl" } */ +/* { dg-options "-O2 -ldl -fprofile-correction" } */ #define _GNU_SOURCE |