diff options
author | H. Peter Anvin <[email protected]> | 2013-02-12 11:47:31 -0800 |
---|---|---|
committer | H. Peter Anvin <[email protected]> | 2013-02-12 12:46:40 -0800 |
commit | 3578baaed4613a9fc09bab9f79f6ce2ac682e8a3 (patch) | |
tree | 2f58dbf5dcc6325fd87f17ccafd00f08bed741d8 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
parent | 16640165c9079e2cf36fdcfca093f29663a716f7 (diff) |
x86, mm: Redesign get_user with a __builtin_choose_expr hack
Instead of using a bitfield, use an odd little trick using typeof,
__builtin_choose_expr, and sizeof. __builtin_choose_expr is
explicitly defined to not convert its type (its argument is required
to be a constant expression) so this should be well-defined.
The code is still not 100% preturbation-free versus the baseline
before 64-bit get_user(), but the differences seem to be very small,
mostly related to padding and to gcc deciding when to spill registers.
Cc: Jamie Lokier <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Russell King <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: H. J. Lu <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions