Re: [PATCH 2/2] perf/x86: Uncore Filter support for SandyBridge-EP

From: Yan, Zheng
Date: Wed Jun 27 2012 - 21:30:14 EST


On 06/27/2012 06:06 PM, Peter Zijlstra wrote:
> On Wed, 2012-06-27 at 15:09 +0800, Yan, Zheng wrote:
>> > @@ -1048,10 +1190,9 @@ static int uncore_validate_group(struct intel_uncore_pmu *pmu,
>> > {
>> > struct perf_event *leader = event->group_leader;
>> > struct intel_uncore_box *fake_box;
>> > - int assign[UNCORE_PMC_IDX_MAX];
>> > int ret = -EINVAL, n;
>> >
>> > - fake_box = uncore_alloc_box(smp_processor_id());
>> > + fake_box = uncore_alloc_box(pmu->type, smp_processor_id());
>> > if (!fake_box)
>> > return -ENOMEM;
>> >
>> > @@ -1073,7 +1214,7 @@ static int uncore_validate_group(struct intel_uncore_pmu *pmu,
>> >
>> > fake_box->n_events = n;
>> >
>> > - ret = uncore_assign_events(fake_box, assign, n);
>> > + ret = uncore_assign_events(fake_box, NULL, n);
>> > out:
>> > kfree(fake_box);
>> > return ret;
> Isn't the uncore now suffering the same problem you found for the
> regular extra stuff?

The snbep_uncore_get/put_constraint(...) has check for that. The uncore case is simpler,
because we don't need try swapping RSP_0/RSP_1.

Regards
Yan, Zheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/