Messages in this thread | | | Date | Thu, 1 Apr 1999 08:40:02 +0200 (CEST) | From | Mike Galbraith <> | Subject | Re: [patch] __volatile__ needed in get_cycles()? |
| |
On Wed, 31 Mar 1999, Jeffrey A Law wrote:
> > In message <Pine.LNX.4.02A.9903312009540.353-100000@mikeg.weiden.de>you write > > It's not off-topic, compiler technicalities are very important in the > > kernel. As to it being optimized away.. it didn't. I think that your > > initial look was dead center.. the second rdtsc was combined with the > > first, which is a lot different from throwing it away. (I would find > > it easy to view combination of two rdtsc insns as a bug tho, given the > > purpose of that insn :) > Two asms with idential asm-strings and the same inputs/clobbers can be > cse'd by the compiler. > > Given two asms with the same output, the first may be deleted if the value > it computes is not used before the second asm (traditional dead code > elimination). > > > In the example provided, it is cse, not combine that (in my opinion) > incorrectly eliminated one of the rdtsc asms (the volatile asms between > the rdtsc asms should have prevented cse from doing that). > > You can see this by running the compiler with the "-dap" option, then > examining the .jump file, then examining the .cse file.
Ah, thanks. I've tried to struggle through these before, but have the problem that I don't know the order in which they are produced. Can you (or anyone) spare a hint as to where to find this info? I've looked, but seemingly in the wrong places. (I just tried strace to find out, but vfork killed that idea)
-Mike
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |