lkml.org 
[lkml]   [2009]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf tools: Add a new generic section in perf.data

* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> +/*
> + * Version 0: contains trace_info section only
> + */
> +struct perf_file_additionals {
> + u64 version;
> + struct perf_file_section trace_info;
> +};

i dont disagree with the change - but it would be even nicer to simply
define a features bitmask, instead of a flat version - and add the
trace_info section as a feature.

That way it's all a lot more manageable: we dont know about versions per
se, we know about features. Individual features could be developed (and
backported) in a distributed way - without having to worry about a flat
version model.

So i'd suggest something like a bitmask in the perf.data file header:

DECLARE_BITMAP(features, 256);

Plus every perf version knows about the features it supports:

DECLARE_BITMAP(features_supported, 256);

The compatibility rule is: perf only touches attributes that belong to
features it knows about.

Ingo


\
 
 \ /
  Last update: 2009-10-16 09:19    [W:0.056 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site