Re: [PATCH] offline gcda profile processing tool

2014-07-13 Thread Andreas Schwab
Rong Xu writes: > In my test, I used gcc-4.6 as the host compiler. I got warning like this: > > In file included from ../../gcc/gcc/../libgcc/libgcov-util.c:30:0: > ../../gcc/gcc/../libgcc/libgcov.h:184:30: warning: ISO C++ forbids > zero-size array ‘ctrs’ [-pedantic] With gcc 4.3 this is an err

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Rong Xu
On Fri, Jul 11, 2014 at 11:46 AM, Jan Hubicka wrote: >> Richard, >> >> I looked at my patch again. I already add -Wno-error to libgcov-util.o >> compilation: >> In line 200 of gcc/Makefile.in >> libgcov-util.o-warn = -Wno-error >> >> In my test, I used gcc-4.6 as the host compiler. I got warning l

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Jan Hubicka
> Richard, > > I looked at my patch again. I already add -Wno-error to libgcov-util.o > compilation: > In line 200 of gcc/Makefile.in > libgcov-util.o-warn = -Wno-error > > In my test, I used gcc-4.6 as the host compiler. I got warning like this: > > In file included from ../../gcc/gcc/../libgcc

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Rong Xu
Richard, I looked at my patch again. I already add -Wno-error to libgcov-util.o compilation: In line 200 of gcc/Makefile.in libgcov-util.o-warn = -Wno-error In my test, I used gcc-4.6 as the host compiler. I got warning like this: In file included from ../../gcc/gcc/../libgcc/libgcov-util.c:30:0

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Rong Xu
I did see the warning in the bootstrap, but it did not exit the build. I thought it was ok. I'll have a patch for this and send for review. -Rong On Fri, Jul 11, 2014 at 9:13 AM, Xinliang David Li wrote: > right. > > Rong, the fix would be just change ctr array size to 1. For each > function, t

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Rong Xu
I should use _WIN32 macro. This code is for windows mkdir api. I'll commit a patch for this shortly (approved by honza). -Rong On Fri, Jul 11, 2014 at 8:49 AM, Xinliang David Li wrote: > What is the macro to test POSIX IO on host? The guard uses > TARGET_POSIX_IO which is not right. > > David >

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Xinliang David Li
right. Rong, the fix would be just change ctr array size to 1. For each function, there should be at least one kind of counters -- see the assertion in build_fn_info_type. There are some code that do 'sizeof(gcov_fn_info)' when computing heap size -- they can be adjusted or leave it as it is (if

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Jakub Jelinek
On Fri, Jul 11, 2014 at 08:42:27AM -0700, Xinliang David Li wrote: > I wonder why. The struct definition for gcov_fn_info has not changed > in this patch. Perhaps it has been used only in C until now? Jakub

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Xinliang David Li
What is the macro to test POSIX IO on host? The guard uses TARGET_POSIX_IO which is not right. David On Fri, Jul 11, 2014 at 1:12 AM, Christophe Lyon wrote: > On 11 July 2014 10:07, Richard Biener wrote: >> On Mon, May 5, 2014 at 7:17 PM, Rong Xu wrote: >>> Here is the updated patch. The diffe

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Xinliang David Li
I wonder why. The struct definition for gcov_fn_info has not changed in this patch. David On Fri, Jul 11, 2014 at 1:07 AM, Richard Biener wrote: > On Mon, May 5, 2014 at 7:17 PM, Rong Xu wrote: >> Here is the updated patch. The difference with patch set 3 is >> (1) use the gcov-counter.def for

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Christophe Lyon
On 11 July 2014 10:07, Richard Biener wrote: > On Mon, May 5, 2014 at 7:17 PM, Rong Xu wrote: >> Here is the updated patch. The difference with patch set 3 is >> (1) use the gcov-counter.def for scaling operation. >> (2) fix wrong scaling function for time-profiler. >> >> passed with bootstrap, p

Re: [PATCH] offline gcda profile processing tool

2014-07-11 Thread Richard Biener
On Mon, May 5, 2014 at 7:17 PM, Rong Xu wrote: > Here is the updated patch. The difference with patch set 3 is > (1) use the gcov-counter.def for scaling operation. > (2) fix wrong scaling function for time-profiler. > > passed with bootstrap, profiledboostrap and SPEC2006. One of the patches bre

Re: [PATCH] offline gcda profile processing tool

2014-05-25 Thread Jan Hubicka
> >> /* Size of the longest file name. */ > >> -static size_t gcov_max_filename = 0; > >> +/* We need to expose this static variable when compiling for gcov-tool. > >> */ > >> +#ifndef IN_GCOV_TOOL > >> +static > >> +#endif > >> +size_t gcov_max_filename = 0; > > > > > > Why max_filename needs t

Re: [PATCH] offline gcda profile processing tool

2014-05-15 Thread Jan Hubicka
> Hi, Honza, > > Please find the new patch in the attachment. This patch integrated > your earlier suggestions. The noticeable changes are: > (1) build specialized object for libgcov-driver.c and libgcov-merge.c > and link into gcov-tool, rather including the source file. > (2) split some gcov cou

Re: [PATCH] offline gcda profile processing tool

2014-04-16 Thread Jan Hubicka
> GCOT_TOOL needs to use this function to read the string in gcda file > to memory to construct gcov_info objects. > As you noticed, gcov runtime does not need this interface. But > gcov-tool links with gcov runtime and it also uses the function. > We could make it available in gcov_runtime, but th

Re: [PATCH] offline gcda profile processing tool

2014-04-16 Thread Rong Xu
On Tue, Apr 15, 2014 at 2:38 PM, Jan Hubicka wrote: > Rong, David, Dehao, Teresa > I would like to have some rought idea of what we could merge this stage1. > There is > certainly a lot of interesting stuff on the google branch including AutoFDO, > LIPO, > the multivalue profile counters that ma

Re: [PATCH] offline gcda profile processing tool

2014-04-15 Thread Jan Hubicka
Rong, David, Dehao, Teresa I would like to have some rought idea of what we could merge this stage1. There is certainly a lot of interesting stuff on the google branch including AutoFDO, LIPO, the multivalue profile counters that may be used by the new devirtualization bits and more. I also thin

Re: [PATCH] offline gcda profile processing tool

2014-01-16 Thread Rong Xu
Ping. -Rong On Mon, Jan 13, 2014 at 12:43 PM, Rong Xu wrote: > Hi, > > This patch implements gcov-tool, a offline profile processing tool. > This version supports merging two profiles with weights, and scaling > the profile with a floating-point / fraction weight. > > Earlier discussion can be f