Re: [tip:perf/core] perf: Ignore non-sampling overflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-06-30 at 14:47 +0200, Robert Richter wrote:
> 
> It covers the case there the sampling period may be specified in the
> raw config register (line 286). I know, this is not the preferred way,
> but this way you can directly set the config value in perf without
> bypassing some bits through event->attr. As IBS events are sampling
> events I will change the code so that it writes back the specified
> period to event->attr.sample_period/event->hw.sample_period. Something
> like:
> 
>         if (event->hw.sample_period) {
>                 ...
>         } else {
>                 max_cnt = event->attr.config & map->cnt_mask;
>                 event->attr.sample_period = max_cnt << 4;
>                 event->hw.sample_period = event->attr.sample_period;
>         }
> 
> This will then proper identify IBS samples as samling event.

Ah, being a naught boy then ;-), yeah passing stuff through like that
will confuse bits and the fixup you propose will indeed work around
that.

But why complicate things like this? You just add extra code to the init
path since you need to support attr.sample_period input as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux