ringtest: use link-time optimization
By using -flto and -fwhole-program, all functions from the ring implementation can be treated as static and possibly inlined. Force this to happen through the GCC flatten attribute. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:

committed by
Michael S. Tsirkin

parent
8424af5336
commit
44d65ea161
@@ -96,7 +96,7 @@ void set_affinity(const char *arg)
|
||||
assert(!ret);
|
||||
}
|
||||
|
||||
static void run_guest(void)
|
||||
static void __attribute__((__flatten__)) run_guest(void)
|
||||
{
|
||||
int completed_before;
|
||||
int completed = 0;
|
||||
@@ -149,7 +149,7 @@ static void run_guest(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void run_host(void)
|
||||
static void __attribute__((__flatten__)) run_host(void)
|
||||
{
|
||||
int completed_before;
|
||||
int completed = 0;
|
||||
|
Reference in New Issue
Block a user