On Mon, Feb 22, 2016 at 11:13 PM, William Cohen <wco...@redhat.com> wrote:

> On 02/22/2016 10:05 AM, Philip Mucci wrote:
> > HI Will,
> >
> > I’ve run into a problem with this on a Sandia system, where no matter
> how hard I tried, I could not get libpfm to run. I had to hack libpfm
> enough to get it to use the internal systems perf_event.h… I haven’t tried
> it recently, to see if everything started working again. My approach
> however is bogus overall, because the idea of libpfm currently is to use
> the most recent header file we have and zero everything out. (I think it
> was the evil exclude_guest plus paranoid=1 combo that did it). The kernel
> seems to do a good job of ignoring everything extra as far as I can tell…
> So I’ve never yet had an issue with writing zeroes everywhere in a big
> struct and handing it to old kernels….
> >
> > One thing we did have a request come in is that we have REAL shared
> library versioning so if you have a patch for this, that would be great.
> Major version should signify API breakage….
> >
> > Regards
>
> Hi Phil,
>
> In theory the kernel handles the perf_event_attr appropriately based on
> the size field of the struct passed in by perf_copy_attr(). However, if
> libpfm is using a perf_event_attr struct larger than the kernel knows about
> any non-zero bits in the part that the kernel doesn't know about are going
> to cause the copy to fail:
>
> http://lxr.free-electrons.com/source/kernel/events/core.c#L8028
>
> Yes, it has been like this since the beginning.
All extra fields must be zero, otherwise the kernel returns an error.


> That would explain why exclude_guest being set by libpfm would cause a
> problem if the kernel didn't know about it.
>
>
> -Will
>
> >> On Feb 17, 2016, at 10:27 PM, William Cohen <wco...@redhat.com> wrote:
> >>
> >> One thing that is concerning is the change to perf_event_attr_t for
> >> pfm_get_perf_event_encoding.  The struct is now larger.  This could
> >> lead to some fields being uninitialized when passed into a libpfm
> >> function or could cause writes pass the end of smaller sized struct
> >> used in older code.
> >
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to