Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-07-31 Thread Jan Hubicka
> On 7/31/20 10:47 AM, Jan Hubicka wrote: > > I think this needs to be restricted to targets that have dl library > > Hm, I can't find a dg-require that is used for similar test-cases. OK, lets get it in and see if it breaks :) Honza > > Martin

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-07-31 Thread Martin Liška
On 7/31/20 10:47 AM, Jan Hubicka wrote: I think this needs to be restricted to targets that have dl library Hm, I can't find a dg-require that is used for similar test-cases. Martin

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-07-31 Thread Jan Hubicka
> On 6/3/20 8:28 AM, Martin Liška wrote: > > On 6/2/20 3:19 PM, Martin Liška wrote: > > > I'm suggesting to pre-allocate 16 gcov_kvp in the gcov run-time library. > > > Please take a look at the attached patch. I also added a test-case that > > > stresses that. I've just finished LTO PGO bootstrap 

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-07-31 Thread Martin Liška
On 6/3/20 8:28 AM, Martin Liška wrote: On 6/2/20 3:19 PM, Martin Liška wrote: I'm suggesting to pre-allocate 16 gcov_kvp in the gcov run-time library. Please take a look at the attached patch. I also added a test-case that stresses that. I've just finished LTO PGO bootstrap of the GCC. Ready 

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-30 Thread Martin Liška
PING^2 On 6/17/20 8:38 AM, Martin Liška wrote: PING^1 On 6/3/20 8:28 AM, Martin Liška wrote: On 6/2/20 3:19 PM, Martin Liška wrote: I'm suggesting to pre-allocate 16 gcov_kvp in the gcov run-time library. Please take a look at the attached patch. I also added a test-case that stresses that. 

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-17 Thread Martin Liška
PING^1 On 6/3/20 8:28 AM, Martin Liška wrote: On 6/2/20 3:19 PM, Martin Liška wrote: I'm suggesting to pre-allocate 16 gcov_kvp in the gcov run-time library. Please take a look at the attached patch. I also added a test-case that stresses that. I've just finished LTO PGO bootstrap of the GCC.

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-09 Thread Martin Liška
On 6/8/20 1:07 PM, Martin Liška wrote: Can you please test the following patch candidate: I've just pushed 862b9b225fb which should fix that. Can you please test the current master? Thanks, Martin

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-08 Thread Martin Liška
On 6/4/20 1:44 AM, Gerald Pfeifer wrote: On Wed, 3 Jun 2020, Martin Liška wrote: Sorry for the breakage. Can you please paste full build output for the problematic .o file? I bet it's a C file compilation, where we should use: __sync_val_compare_and_swap (counter, 0, (intptr_t)node); Can you

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-03 Thread Gerald Pfeifer
On Wed, 3 Jun 2020, Martin Liška wrote: > Sorry for the breakage. Can you please paste full build output for the > problematic .o file? > > I bet it's a C file compilation, where we should use: > > __sync_val_compare_and_swap (counter, 0, (intptr_t)node); > > Can you please test it? c++

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-03 Thread Martin Liška
On 6/2/20 3:19 PM, Martin Liška wrote: I'm suggesting to pre-allocate 16 gcov_kvp in the gcov run-time library. Please take a look at the attached patch. I also added a test-case that stresses that. I've just finished LTO PGO bootstrap of the GCC. Ready for master? There's V2 of the patch: -

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-03 Thread Martin Liška
On 6/3/20 3:07 AM, Gerald Pfeifer wrote: On Tue, 2 Jun 2020, Martin Liška wrote: Ready for master? Before that, my nightly tester on i386-unknown-freebsd11 just ran into the following: /scratch/tmp/gerald/GCC-HEAD/gcc/../libgcc/libgcov.h:396:51: error: cannot initialize a parameter of

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-02 Thread Gerald Pfeifer
On Tue, 2 Jun 2020, Martin Liška wrote: > Ready for master? Before that, my nightly tester on i386-unknown-freebsd11 just ran into the following: /scratch/tmp/gerald/GCC-HEAD/gcc/../libgcc/libgcov.h:396:51: error: cannot initialize a parameter of type 'gcov_type' (aka 'long long') with

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-02 Thread Martin Liška
On 6/2/20 10:27 AM, Jan Hubicka wrote: The patch looks good (and is OK for mainline). I am bit concerned about two things. Hello. Thank you for the review! 1) I think we should add support to pre-allocate memory pool so we hide the problem with instrumenting malloc (I think with big

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-02 Thread Jan Hubicka
> > 2020-04-03 Martin Liska > > * coverage.c (get_coverage_counts): Skip sanity check for TOP N counters > as they have variable number of counters. > * gcov-dump.c (main): Add new option -r. > (print_usage): Likewise. > (tag_counters): All new raw format. >

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-05-27 Thread Martin Liška
PING^2 On 5/15/20 11:57 AM, Martin Liška wrote: We're in stage1: PING^

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-05-15 Thread Martin Liška
On 5/15/20 1:03 PM, Jan Hubicka wrote: I wonder, did we somehow solved the issue with Firefox breaking due to malloc instrumentation? Yes, you proposed a patch: https://hg.mozilla.org/try/rev/e1358ef2d82c035b12f8995712580c77bd9f8d43 Which I believe was sent to Firefox? Martin

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-05-15 Thread Jan Hubicka
> We're in stage1: PING^1 I wonder, did we somehow solved the issue with Firefox breaking due to malloc instrumentation? Honza > > On 4/6/20 10:03 AM, Martin Liška wrote: > > Hi. > > > > We've started discussion the patch with Honza when we started working on > > reproducibility of

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-05-15 Thread Martin Liška
We're in stage1: PING^1 On 4/6/20 10:03 AM, Martin Liška wrote: Hi. We've started discussion the patch with Honza when we started working on reproducibility of -fprofile-generate/use. The patch replaces pre-allocated TOP N counters with a dynamical linked list allocation that happens during

[stage1][PATCH] Make TOPN counter dynamically allocated.

2020-04-06 Thread Martin Liška
Hi. We've started discussion the patch with Honza when we started working on reproducibility of -fprofile-generate/use. The patch replaces pre-allocated TOP N counters with a dynamical linked list allocation that happens during profiling. The similar approach is used by Clang and it provides