Re: [PATCH] trace: Add migrate-disabled counter to tracing output.

From: Sebastian Andrzej Siewior
Date: Fri Aug 06 2021 - 14:10:49 EST


On 2021-08-06 13:51:24 [-0400], Steven Rostedt wrote:
> > diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
> > index ad413b382a3ca..7c4280b4c6be7 100644
> > --- a/include/linux/trace_events.h
> > +++ b/include/linux/trace_events.h
> > @@ -69,6 +69,7 @@ struct trace_entry {
> > unsigned char flags;
> > unsigned char preempt_count;
> > int pid;
> > + unsigned char migrate_disable;
>
> The only issue I have with this patch is this part. It extends the
> header of all events beyond 8 bytes, and actually adds another 4 or 8
> bytes despite being just a char in size. That's because this is a
> header of a structure, which depending on the first field of an event,
> padding may be added to have 4 or 8 byte alignment.
>
> I'll be fine with merging this counter with either flags or
> preempt_count (neither needs all 8 bits). I can figure out how to
> update libtraceevent to handle this case.

I was kind of expecting that. Let me try 4 bits for the preempt counter
and 4 bits for the migrate counter.

> -- Steve
>

Sebastian