linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] libtraceevent: Handling cpumask event fields
@ 2022-11-16 14:41 Valentin Schneider
  2022-11-16 14:41 ` [PATCH v2 1/2] libtraceevent: Add boiler-plate code for cpumask types Valentin Schneider
  2022-11-16 14:46 ` [PATCH v2 2/2] libtraceevent: Pretty-print cpumask fields as a cpulist Valentin Schneider
  0 siblings, 2 replies; 7+ messages in thread
From: Valentin Schneider @ 2022-11-16 14:41 UTC (permalink / raw)
  To: linux-trace-devel
  Cc: Steven Rostedt, Daniel Bristot de Oliveira, Clark Williams,
	Douglas RAILLARD

Hi folks,

While discussing around [1], Steve had the idea [2] of creating a "proper" type
for cpumask event fields so that userspace tooling doesn't have to guess whether
an unsigned long [] is meant to be a cpumask or not.

It takes a small amount of boiler plate to get cpumask fields on the same level
as bitmask fields, which is patch 1.

Patch 2 adds on top a nicer pretty-print output for cpumasks. I'm not massively
fond of the homegrown cpumask iterating function, but I've done my best to pit
it against corner cases.

Cheers,
Valentin

Revisions
=========

v1 -> v2
++++++++
o Rebased on top of latest libtraceevent
o Fixed s/__get_cpumask/__get_rel_cpumask/ typo

[1]: http://lore.kernel.org/r/xhsmhilkqfi7z.mognet@vschneid.remote.csb
[2]: http://lore.kernel.org/r/20221014080456.1d32b989@rorschach.local.home

Valentin Schneider (2):
  libtraceevent: Add boiler-plate code for cpumask types
  libtraceevent: Pretty-print cpumask fields as a cpulist

 include/traceevent/event-parse.h |   1 +
 src/event-parse.c                | 190 +++++++++++++++++++++++++++++++
 2 files changed, 191 insertions(+)

--
2.31.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-07  9:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 14:41 [PATCH v2 0/2] libtraceevent: Handling cpumask event fields Valentin Schneider
2022-11-16 14:41 ` [PATCH v2 1/2] libtraceevent: Add boiler-plate code for cpumask types Valentin Schneider
2022-12-06 20:08   ` Steven Rostedt
2022-12-07  9:55     ` Valentin Schneider
2022-11-16 14:46 ` [PATCH v2 2/2] libtraceevent: Pretty-print cpumask fields as a cpulist Valentin Schneider
2022-12-06 20:32   ` Steven Rostedt
2022-12-07  9:55     ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).