On Tue, 6 May 2014 19:16:34 +0000 (UTC) Mathieu Desnoyers <[email protected]> wrote:
> ----- Original Message ----- > > From: "Steven Rostedt" <[email protected]> > > To: "LKML" <[email protected]> > > Cc: "Javi Merino" <[email protected]>, "Andrew Morton" > > <[email protected]>, "Mathieu Desnoyers" > > <[email protected]>, "Ingo Molnar" <[email protected]>, > > "Namhyung Kim" <[email protected]>, "Jiri > > Olsa" <[email protected]> > > Sent: Tuesday, May 6, 2014 1:22:38 PM > > Subject: [RFC][PATCH] tracing: Add __cpumask() macro to trace events to > > record cpumasks > > > > > > Being able to show a cpumask of events can be useful as some events > > may affect only some CPUs. There is no standard way to record the > > cpumask and converting it to a string is rather expensive during > > the trace as traces happen in hotpaths. It would be better to record > > the raw event mask and be able to parse it at print time. > > Why name the type cpumask especially ? The type could be a "bitmask", > and the specific field semantic in this case (field name) could > be "cpus", thus implying that this is a cpu mask. This would allow > using bitmasks for other things than cpu masks. Hmm, sure, perhaps it would be better to call it bitmask instead. It basically is already. > > Moreover, I've been thinking about eventually adding a bitmask associated > with an enumeration, so each bit of the bitmask could be associated with > an entry from an enumeration (a string). So having a bitmask type would > be a good step in that direction. For instance, the block layer > instrumentation could use this for the rwbs field, instead of > printing characters with blk_fill_rwbs(). This would save space and > cpu time at trace collection. Perhaps. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

