I'm feeling pretty out of it :-). I'm very happy to see that the Pentium tsc patch made it into the core; I had missed it. I'm amused that the Pentium tsc patch works for PPC, too. Anyway, I tried to use it this evening and the compilation failed: ../Python/ceval.c:50:21: asm/msr.h: No such file or directory ../Python/ceval.c: In function `PyEval_EvalFrame': ../Python/ceval.c:575: warning: implicit declaration of function `rdtscll' ../Python/ceval.c:572: warning: `inst0' might be used uninitialized in this function ../Python/ceval.c:572: warning: `inst1' might be used uninitialized in this function ../Python/ceval.c:572: warning: `loop0' might be used uninitialized in this function ../Python/ceval.c:572: warning: `loop1' might be used uninitialized in this function It sounds like <asm/msr.h> is for Microsoft platforms, but I'm building on Linux. Perhaps the change to add PPC support screwed up the ifdefs that were detecting a Windows compile? Does it work for anyone else? Jeremy
It sounds like <asm/msr.h> is for Microsoft platforms, but I'm building on Linux. Perhaps the change to add PPC support screwed up the ifdefs that were detecting a Windows compile? Does it work for anyone else?
/usr/include/asm/msr.h exists on my linux system (mixed Debian 3.0) (msr.h came with linux-kernel-headers package, my kernel version 2.4.25) and compile with WITH_TSC defined worked fine for me about a week ago Ilya PS. just checked my other ancient RedHat 7.2 install and it also has /usr/include/asm/msr.h On Tue, 14 Sep 2004, Jeremy Hylton wrote:
I'm feeling pretty out of it :-). I'm very happy to see that the Pentium tsc patch made it into the core; I had missed it. I'm amused that the Pentium tsc patch works for PPC, too. Anyway, I tried to use it this evening and the compilation failed:
../Python/ceval.c:50:21: asm/msr.h: No such file or directory ../Python/ceval.c: In function `PyEval_EvalFrame': ../Python/ceval.c:575: warning: implicit declaration of function `rdtscll' ../Python/ceval.c:572: warning: `inst0' might be used uninitialized in this function ../Python/ceval.c:572: warning: `inst1' might be used uninitialized in this function ../Python/ceval.c:572: warning: `loop0' might be used uninitialized in this function ../Python/ceval.c:572: warning: `loop1' might be used uninitialized in this function
It sounds like <asm/msr.h> is for Microsoft platforms, but I'm building on Linux. Perhaps the change to add PPC support screwed up the ifdefs that were detecting a Windows compile? Does it work for anyone else?
Jeremy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/ilya%40bluefir.net
Jeremy Hylton <jhylton@gmail.com> writes:
I'm feeling pretty out of it :-). I'm very happy to see that the Pentium tsc patch made it into the core; I had missed it. I'm amused that the Pentium tsc patch works for PPC, too.
I did consider changing all the names but couldn't be bothered.
Anyway, I tried to use it this evening and the compilation failed:
../Python/ceval.c:50:21: asm/msr.h: No such file or directory ../Python/ceval.c: In function `PyEval_EvalFrame': ../Python/ceval.c:575: warning: implicit declaration of function `rdtscll' ../Python/ceval.c:572: warning: `inst0' might be used uninitialized in this function ../Python/ceval.c:572: warning: `inst1' might be used uninitialized in this function ../Python/ceval.c:572: warning: `loop0' might be used uninitialized in this function ../Python/ceval.c:572: warning: `loop1' might be used uninitialized in this function
It sounds like <asm/msr.h> is for Microsoft platforms, but I'm building on Linux. Perhaps the change to add PPC support screwed up the ifdefs that were detecting a Windows compile?
Well, it failed like that for me both before and after my PPC changes. I'm fairly sure I didn't mess this up. Maybe there's some kernel-headers package that's necessary. OTOH, I think one could replace the include by #define rdtscll(val) \ __asm__ __volatile__("rdtsc" : "=A" (val)) if my limited googling is anything to go by. It also seems asm/msr.h is a "kernel internal header with absolutely no stable API properties...." (Redhat bugzilla). So, now I've written this email <wink>, I think we should take out the include and put in the #define. Anyone who cares about, e.g., Windows can find out how to make their compiler do this. Cheers, mwh -- Presumably pronging in the wrong place zogs it. -- Aldabra Stoddart, ucam.chat
Michael Hudson wrote:
Well, it failed like that for me both before and after my PPC changes. I'm fairly sure I didn't mess this up. Maybe there's some kernel-headers package that's necessary.
OTOH, I think one could replace the include by
#define rdtscll(val) \ __asm__ __volatile__("rdtsc" : "=A" (val))
if my limited googling is anything to go by. It also seems asm/msr.h is a "kernel internal header with absolutely no stable API properties...." (Redhat bugzilla).
I'ld still like to understand why it fails for your system (it works fine on mine). Do you have a definition for rdtscll in /usr/include/asm/msr.h? Is it a define like the one you just put there? If so, why does the macro not expand? Regards, Martin
"Martin v. Löwis" <martin@v.loewis.de> writes:
Michael Hudson wrote:
Well, it failed like that for me both before and after my PPC changes. I'm fairly sure I didn't mess this up. Maybe there's some kernel-headers package that's necessary. OTOH, I think one could replace the include by #define rdtscll(val) \ __asm__ __volatile__("rdtsc" : "=A" (val)) if my limited googling is anything to go by. It also seems asm/msr.h is a "kernel internal header with absolutely no stable API properties...." (Redhat bugzilla).
I'ld still like to understand why it fails for your system (it works fine on mine). Do you have a definition for rdtscll in /usr/include/asm/msr.h?
I don't *have* asm/msr.h! And the impression I get is that we shouldn't be going near it with the proverbial bargepole. Cheers, mwh -- (ps: don't feed the lawyers: they just lose their fear of humans) -- Peter Wood, comp.lang.lisp
Michael Hudson wrote:
I don't *have* asm/msr.h! And the impression I get is that we shouldn't be going near it with the proverbial bargepole.
Ah, ok - I probably missed the relevant gcc error message about the missing header file in earlier reports. It is fine then to use a copy of the macro. It should probably apply to all installations where both __GNUC__ and __i386__ are defined. Regards, Martin
On Wed, 15 Sep 2004 14:51:55 +0100, Michael Hudson <mwh@python.net> wrote:
Jeremy Hylton <jhylton@gmail.com> writes:
I'm feeling pretty out of it :-). I'm very happy to see that the Pentium tsc patch made it into the core; I had missed it. I'm amused that the Pentium tsc patch works for PPC, too.
I did consider changing all the names but couldn't be bothered.
There's nothing wrong with amusing names for obscure stuff like this :-).
OTOH, I think one could replace the include by
#define rdtscll(val) \ __asm__ __volatile__("rdtsc" : "=A" (val))
if my limited googling is anything to go by. It also seems asm/msr.h is a "kernel internal header with absolutely no stable API properties...." (Redhat bugzilla).
So, now I've written this email <wink>, I think we should take out the include and put in the #define.
I'll give it a try tonight. I double-checked and my somewhat tweaked RH Linux distro doesn't have an asm/msr.h. I'd rather not try to find out if there is an rdtscll() defined somewhere else. jeremy
On Wed, 15 Sep 2004 14:56:43 -0400, Jeremy Hylton <jhylton@gmail.com> wrote:
On Wed, 15 Sep 2004 14:51:55 +0100, Michael Hudson <mwh@python.net> wrote:
if my limited googling is anything to go by. It also seems asm/msr.h is a "kernel internal header with absolutely no stable API properties...." (Redhat bugzilla).
So, now I've written this email <wink>, I think we should take out the include and put in the #define.
In RedHat 9 and Fedora Core 1, msr.h is not installed under /usr/include/. There are only versions for x86 and amd64 in the kernel source. Michael's suggestion about adding the #define is probably the best way to handle it for now. Neal
participants (5)
-
"Martin v. Löwis"
-
Ilya Sandler
-
Jeremy Hylton
-
Michael Hudson
-
Neal Norwitz