lkml.org 
[lkml]   [2010]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock
    On Tue, 13 Jul 2010, Avi Kivity wrote:

    >> The same:
    >>
    >> [git|v2.6.32.16] weasel@thelma:/scratch/kernel/2.6.32.16$ nm arch/x86/kernel/pvclock.o
    >> 0000000000000000 r last_value
    >> U native_read_tsc
    >> 0000000000000040 T pvclock_clocksource_read
    >> 0000000000000100 T pvclock_read_wallclock
    >> 0000000000000000 T pvclock_tsc_khz
    >> U set_normalized_timespec
    >>
    >
    > But it's
    >
    >>
    >> static atomic64_t last_value = ATOMIC64_INIT(0);
    >>
    >
    > Doesn't make any sense.
    >
    > Let's try to see if the toolchain is confused:
    >
    > - rename last_value to some random name

    0000000000000000 r some_random_name

    > - drop the 'static' qualifier

    0000000000000000 B last_value

    > - drop the '= ATOMIC64_INIT(0)'

    0000000000000000 b last_value

    > - all of the above

    0000000000000000 B some_random_name




    make -f scripts/Makefile.build obj=arch/x86/kernel arch/x86/kernel/pvclock.o
    gcc -Wp,-MD,arch/x86/kernel/.pvclock.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include -Iinclude -I/scratch/kernel/2.6.32.16/arch/x86/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(pvclock)" -D"KBUILD_MODNAME=KBUILD_STR(pvclock)" -c -o arch/x86/kernel/pvclock.o arch/x86/kernel/pvclock.c

    [git|v2.6.32.16] weasel@thelma:/scratch/kernel/2.6.32.16$ gcc --version
    gcc (Debian 4.3.2-1.1) 4.3.2
    Copyright (C) 2008 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Using -O0 also results in a writeable last_value (b).

    --
    | .''`. ** Debian GNU/Linux **
    Peter Palfrader | : :' : The universal
    http://www.palfrader.org/ | `. `' Operating System
    | `- http://www.debian.org/


    \
     
     \ /
      Last update: 2010-07-13 18:55    [W:4.553 / U:1.872 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site