On Thu, 12 Nov 2020 09:18:21 +0000
David Laight <david.lai...@aculab.com> wrote:

> From: Steven Rostedt
> > Sent: 12 November 2020 00:33
> > 
> > Inspecting the data structures of the function graph tracer, I found that
> > the overrun value is unsigned long, which is 8 bytes on a 64 bit machine,
> > and not only that, the depth is an int (4 bytes). The overrun can be simply
> > an unsigned int (4 bytes) and pack the ftrace_graph_ret structure better.
> > 
> > The depth is moved up next to the func, as it is used more often with func,
> > and improves cache locality.  
> ...
> >  } __packed;  
> 
> Does this many any/much difference given that the structure is
> marked __packed?
> 
> OTOH the __packed will (probably) kill performance on systems
> that don't support mis-aligned accesses.
> 

I think you answered your own question ;-)

That was why I try to keep 4 byte items together. But the point here was
that overrun is hardly ever used (probably could just be a single byte),
and there was no reason for it to be a long.

-- Steve

Reply via email to