RE: [for-next][PATCH 12/17] fgraph: Make overruns 4 bytes in graph stack structure
From: David Laight
Date: Thu Nov 12 2020 - 04:18:29 EST
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.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)