lkml.org 
[lkml]   [2014]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/16] perf pmu: Let pmu's with no events show up on perf list
Em Fri, Oct 24, 2014 at 09:57:02AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Oct 24, 2014 at 02:15:52PM +0900, Namhyung Kim escreveu:
> > On Thu, 23 Oct 2014 13:45:10 +0300, Adrian Hunter wrote:
> > > + if (pmu->selectable) {
> > > + scnprintf(buf, sizeof(buf), "%s//", pmu->name);
> > > + aliases[j] = strdup(buf);
> >
> > You need to check the return value here (and above too).
>
> Well spotted, fixing this up.

Oh well, this print_pmu_events() function needs some care, it starts by
trying to alloc the array, if it fails, it silently returns, does that
mean that there are no pmu events? Or that memory allocation failed?

Ok, will do the fixes in a separate patch...

- Arnaldo


\
 
 \ /
  Last update: 2014-10-24 15:41    [W:0.082 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site