Re: [perfmon2] I.2 - Grouping

2009-06-23 Thread stephane eranian
Corey, On Tue, Jun 23, 2009 at 12:04 AM, Corey Ashford wrote: > stephane eranian wrote: >> >> On Mon, Jun 22, 2009 at 1:50 PM, Ingo Molnar wrote: 2/ Grouping By design, an event can only be part of one group at a time. >> >> As I read this again, another question came up. Is th

Re: [perfmon2] I.2 - Grouping

2009-06-23 Thread Corey Ashford
stephane eranian wrote: > On Tue, Jun 23, 2009 at 10:26 AM, Paul Mackerras wrote: >> stephane eranian writes: >> >>> What happens if I do: >>>fd0 = perf_counter_open(&hwc1, getpid(), -1, -1, 0); >>>fd1 = perf_counter_open(&hwc2, getpid(), -1, fd0, 0); >>> >>> And then: >>>fd2 = perf_cou

Re: [perfmon2] I.2 - Grouping

2009-06-23 Thread stephane eranian
On Tue, Jun 23, 2009 at 10:26 AM, Paul Mackerras wrote: > stephane eranian writes: > >> What happens if I do: >>    fd0 = perf_counter_open(&hwc1, getpid(), -1, -1, 0); >>    fd1 = perf_counter_open(&hwc2, getpid(), -1, fd0, 0); >> >> And then: >>    fd2 = perf_counter_open(&hwc2, getpid(), -1, fd1

Re: [perfmon2] I.2 - Grouping

2009-06-23 Thread Paul Mackerras
stephane eranian writes: > What happens if I do: >fd0 = perf_counter_open(&hwc1, getpid(), -1, -1, 0); >fd1 = perf_counter_open(&hwc2, getpid(), -1, fd0, 0); > > And then: >fd2 = perf_counter_open(&hwc2, getpid(), -1, fd1, 0); That perf_counter_open call will fail with an EINVAL erro

Re: [perfmon2] I.2 - Grouping

2009-06-23 Thread stephane eranian
On Tue, Jun 23, 2009 at 7:16 AM, Paul Mackerras wrote: > Ingo Molnar writes: > >> > 2/ Grouping >> > >> > By design, an event can only be part of one group at a time. > > To clarify this statement of Stephane's, a _counter_ can only be in > one group.  You can have multiple counters counting the sa

Re: [perfmon2] I.2 - Grouping

2009-06-22 Thread Paul Mackerras
Ingo Molnar writes: > > 2/ Grouping > > > > By design, an event can only be part of one group at a time. To clarify this statement of Stephane's, a _counter_ can only be in one group. You can have multiple counters counting the same _event_ and those counters can (obviously) be in different grou

Re: [perfmon2] I.2 - Grouping

2009-06-22 Thread Corey Ashford
stephane eranian wrote: > On Mon, Jun 22, 2009 at 1:50 PM, Ingo Molnar wrote: >>> 2/ Grouping >>> >>> By design, an event can only be part of one group at a time. > > As I read this again, another question came up. Is the statement > above also true for the group leader? > > >>> Events in a grou

Re: [perfmon2] I.2 - Grouping

2009-06-22 Thread Corey Ashford
Ingo Molnar wrote: >> 2/ Grouping >> >> By design, an event can only be part of one group at a time. >> Events in a group are guaranteed to be active on the PMU at the >> same time. That means a group cannot have more events than there >> are available counters on the PMU. Tools may want to know

Re: [perfmon2] I.2 - Grouping

2009-06-22 Thread stephane eranian
On Mon, Jun 22, 2009 at 1:50 PM, Ingo Molnar wrote: >> 2/ Grouping >> >> By design, an event can only be part of one group at a time. As I read this again, another question came up. Is the statement above also true for the group leader? >> Events in a group are guaranteed to be active on the PMU

Re: [perfmon2] I.2 - Grouping

2009-06-22 Thread Ingo Molnar
> 2/ Grouping > > By design, an event can only be part of one group at a time. > Events in a group are guaranteed to be active on the PMU at the > same time. That means a group cannot have more events than there > are available counters on the PMU. Tools may want to know the > number of counters av