summary refs log tree commit diff stats
path: root/scripts/tracetool/backend/log.py
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2025-06-10 13:36:39 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2025-06-12 13:39:07 -0400
commitc653b67d1863b7ebfa67f7c9f4aec209d7b5ced5 (patch)
treeaccacdd8b9f096931719b551776f3f6caa78ce61 /scripts/tracetool/backend/log.py
parentd9ce74873a6a5a7c504379857461e4ae64fcf0cd (diff)
downloadfocaccia-qemu-c653b67d1863b7ebfa67f7c9f4aec209d7b5ced5.tar.gz
focaccia-qemu-c653b67d1863b7ebfa67f7c9f4aec209d7b5ced5.zip
include/qemu/compiler: add QEMU_UNINITIALIZED attribute macro
The QEMU_UNINITIALIZED macro is to be used to skip the default compiler
variable initialization done by -ftrivial-auto-var-init=zero.

Use this in cases where there a method in the device I/O path (or other
important hot paths), that has large variables on the stack. A rule of
thumb is that "large" means a method with 4kb data in the local stack
frame. Any variables which are KB in size, should be annotated with this
attribute, to pre-emptively eliminate any potential overhead from the
compiler zero'ing memory.

Given that this turns off a security hardening feature, when using this
to flag variables, it is important that the code is double-checked to
ensure there is no possible use of uninitialized data in the method.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20250610123709.835102-2-berrange@redhat.com
[DB: split off patch & rewrite guidance on when to use the annotation]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/tracetool/backend/log.py')
0 files changed, 0 insertions, 0 deletions