lkml.org 
[lkml]   [2013]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] gcov: add support for gcc 4.7 gcov format
On Wed, 18 Sep 2013 14:27:05 -0700 Joe Perches <joe@perches.com> wrote:

> On Wed, 2013-09-18 at 14:22 -0700, Andrew Morton wrote:
> > On Wed, 4 Sep 2013 16:42:54 +0200 Frantisek Hrbata <fhrbata@redhat.com> wrote:
> > > The gcov in-memory format changed in gcc 4.7. The biggest change, which
> > > requires this special implementation, is that gcov_info no longer contains
> > > array of counters for each counter type for all functions and gcov_fn_info is
> > > not used for mapping of function's counters to these arrays(offset). Now each
> > > gcov_fn_info contans it's counters, which makes things a little bit easier.
> > >
> > > This is heavily based on the previous gcc_3_4.c implementation and patches
> > > provided by Peter Oberparleiter. Specially the buffer gcda implementation for
> > > iterator.
> >
> > A couple of little tweaks:
> []
> > +++ a/kernel/gcov/gcc_4_7.c
> []
> > @@ -267,8 +266,8 @@ struct gcov_info *gcov_info_dup(struct g
> > if (!dup->filename)
> > goto err_free;
> >
> > - dup->functions = kzalloc(sizeof(struct gcov_fn_info *) *
> > - info->n_functions, GFP_KERNEL);
> > + dup->functions = kcalloc(sizeof(struct gcov_fn_info *),
> > + info->n_functions, GFP_KERNEL);
>
> kcalloc(n, size_t, flags)
>
> dup->functions = kcalloc(info->n_functions,
> sizeof(struct gcov_fn_info *), GFP_KERNEL);
>

Already did that after checkpatch whined at me. Stupid thing.


\
 
 \ /
  Last update: 2013-09-19 00:01    [W:0.500 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site