Re: Perf ABI versioning

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

 



[ added Ingo, Steven, Thomas and Peter to CC list ]

* Thomas Renninger (trenn@xxxxxxx) wrote:
> Hi,
> 
> as I recently cleaned up the power events with
> some format/abi adjustings...
> 
> I realized that it was rather easy to adjust
> the stuff in drivers/tools/perf, because there
> are some nice facilities to query which events
> are available.
> 
> I looked at pytimechart, there it's not that nice
> and convenient would be some kind of version number.
> 
> pytimechart can parse traces which are simply copied
> away from /sys/kernel/debug/trace and to check for
> available events and their format, one would have to
> do a separate, ugly to implement, iteration of parsing.
> 
> Would it make sense to introduce a trace
> ABI version number?
> It would be enough to increase it by one every time
> any event (don't know about other perf facilities) is
> added, removed or modified.
> Ideally the modifications are tracked with a short
> description in a file like Documentation/trace/format.changes
> 
> Untested, but the patch at the end should simply add
> a version number on top of
> /sys/kernel/debug/trace file
> 
> While this should be enough for the kernel, perf record
> would need to include it into it's binary perf.data format
> as well?
> 
> Then userspace apps could easily test whether supported
> events would be included at all, whether only a subset of
> supported events were made available and which format they have.
> 
> Does this make sense?

Hi Thomas,

I think it might make more sense to make pytimechart read the
/sys/kernel/debug/tracing/events/*/*/format files to find out if the
print-format for the events are as expected. I think this is much more adapted
to a development scheme where subsystem maintainers are responsible for changing
the content of their own events than a single global version number that needs
to be bumped synchronously for everything.

I would agree, though, about the need for a version number on the way
/sys/kernel/debug/tracing/events exports the binary event type and text-output
formatting information: in order to cope with changes to the way this metadata
is exported, we'd need such a versioning number.

But again, trying to version every tiny change to the fields per se won't scale
with the development process given that we pull instrumentation changes from
many different repository concurrently. The field layout information is there to
deal with this problem, pytimechart should perhaps start using it.

Thanks,

Mathieu

> 
> Thanks,
> 
>     Thomas

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-trace-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux