]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Ensure that f() doesn't get inlined.
authorNicholas Nethercote <njn@valgrind.org>
Wed, 14 Dec 2005 05:33:17 +0000 (05:33 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Wed, 14 Dec 2005 05:33:17 +0000 (05:33 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5340

perf/sarp.c

index cf803fe35a9f735ea9901a11f304e08212d06b37..6265ad7245e8f280b4c64410557368d66c640e2d 100644 (file)
 
 #define REPS   1000*1000*10
 
+__attribute__((noinline))
 int f(int i)
 {
    // This nonsense is just to ensure that the compiler does not optimise
    // away the stack allocation.
    char big_array[500];
-   big_array[0]   = 12;
+   big_array[  0] = 12;
    big_array[ 23] = 34;
    big_array[256] = 56;
    big_array[434] = 78;