pcp
[Top] [All Lists]

Re: [pcp] problems with PM_TYPE_AGGREGATE and __pmStuffValue and libpcp_

To: kenj@xxxxxxxxxxxxxxxx
Subject: Re: [pcp] problems with PM_TYPE_AGGREGATE and __pmStuffValue and libpcp_pmda
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Fri, 17 Dec 2010 11:55:34 +1100 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1292451612.27068.42.camel@xxxxxxxxxxxxxxxx>
----- "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx> wrote:

> In cleaning up the event record stuff and pushing some generic
> functionality into libpcp and libpcp_pmda I've stumbled across
> something
> that is broken in various ways in lots of places.
> 
> The issue is with PM_TYPE_AGGREGATE (but both of the related types
> PM_TYPE_AGGREGATE_STATIC and PM_TYPE_EVENT are OK) and the way
> __pmStuffValue is called from pmdaFetch in libpcp_pmda.
> 
> The aggr_len argument to __pmStuffValue is only ever used in the
> PM_TYPE_AGGREGATE case, but in pmdaFetch the call to __pmStuffValue
> unconditionally uses the value 0 for aggr_len and there is no way for
> the pmdaFetchCallback method to return a value for aggr_len.
> 
> This has not been a problem to date because
> a. PM_TYPE_AGGREGATE is rarely used, and
> b. in the places where PM_TYPE_AGGREGATE is used it is either not in
> a
> PMDA, or in a PMDA that over-rides the pmdaFetch method.
> 
> Here are my notes on possible fixes and implications thereof ... I'm
> voting for Option 3 and would appreciate feedback from others.
> 

3 does sound like the best of a bad lot, I'd go with that.

cheers.

-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>