Messages in this thread | | | Date | Mon, 25 Jan 2021 12:01:56 +0100 | From | Peter Zijlstra <> | Subject | Re: [RFC PATCH] perf: Handle multiple formatted AUX records |
| |
On Mon, Jan 25, 2021 at 10:45:06AM +0000, Suzuki K Poulose wrote: > On 1/25/21 10:25 AM, Peter Zijlstra wrote:
> > Since we have a whole u64, do we want to reserve a whole nibble (or > > maybe even a byte) for a format type? Because with a single bit like > > this, we'll kick ourselves when we end up with the need for a 3rd format > > type. > > > > Sure, makes sense. We could do: > > #define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 > > Additionally, the values could be allocated by individual PMUs and > interpreted by the corresponding counterpart. That way we don't > have to worry about centralized allocation of the "TYPE" fields. > > e,g: > > #define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 > #define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 > > #define PERF_AUX_FLAG_RANDOM_PMU_FORMAT_FMT1 0x0000 > #define PERF_AUX_FLAG_RANDOM_PMU_FORMAT_FMT2 0x0100 > > > What do you think ?
Sounds good to me.
| |