tracing: make preempt_lazy and migrate_disable counter smaller
The migrate_disable counter should not exceed 255 so it is enough to store it in an 8bit field. With this change we can move the `preempt_lazy_count' member into the gap so the whole struct shrinks by 4 bytes to 12 bytes in total. Remove the `padding' field, it is not needed. Update the tracing fields in trace_define_common_fields() (it was missing the preempt_lazy_count field). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This commit is contained in:
parent
e56519fc8a
commit
3af424b7f4
|
@ -62,8 +62,7 @@ struct trace_entry {
|
|||
unsigned char flags;
|
||||
unsigned char preempt_count;
|
||||
int pid;
|
||||
unsigned short migrate_disable;
|
||||
unsigned short padding;
|
||||
unsigned char migrate_disable;
|
||||
unsigned char preempt_lazy_count;
|
||||
};
|
||||
|
||||
|
|
|
@ -181,8 +181,8 @@ static int trace_define_common_fields(void)
|
|||
__common_field(unsigned char, flags);
|
||||
__common_field(unsigned char, preempt_count);
|
||||
__common_field(int, pid);
|
||||
__common_field(unsigned short, migrate_disable);
|
||||
__common_field(unsigned short, padding);
|
||||
__common_field(unsigned char, migrate_disable);
|
||||
__common_field(unsigned char, preempt_lazy_count);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue