WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] performance profiling current and future steps


On Mar 26, 2007, at 8:26 AM, Christian Ehrhardt wrote:

Jimi Xenidis wrote:

On Mar 23, 2007, at 9:07 AM, Hollis Blanchard wrote:

Right, that won't fit in EXCEPTION_HEAD (you will get the assembler
error messages Jimi pasted above).

Yeah,
So EXCEPTION_HEAD branches to a passed in label. Find all those labels and insert PMU_SAVE_STATE there.

I need a register to clobber with my "ori". (H_) EXCEPTION_SAVE_STATE clobbers r0 anyway and it resides in all continue labels that are passed to EXCEPTION_HEAD. So PMU_SAVE_STATE can follow in its wake and clobber r0 too like EXCEPTION_SAVE_STATE.

branches to EXCEPTION_HEAD:
xenppc-unstable_step1/xen# cat arch/powerpc/powerpc64/ exceptions.S | grep "EXCEPTION_HEAD" | sort | uniq
           EXCEPTION_HEAD r13 ex_dec_continued
           EXCEPTION_HEAD r13 ex_external_continued
           EXCEPTION_HEAD r13 ex_hcall_continued
           EXCEPTION_HEAD r13 ex_hdec_continued
           EXCEPTION_HEAD r13 ex_machcheck_continued
           EXCEPTION_HEAD r13 ex_program_continued



One of those calls as example "diff -Naur":
@@ -384,6 +391,7 @@
    mr r14, r0
    EXCEPTION_SAVE_STATE r1
+    PMU_SAVE_STATE r0,r0
    mr r4, r14
    LOADADDR r12, program_exception
mr r3, r1 /* pass pointer to cpu_user_regs */

Please correct me If my assumption is wrong that I'm allowed to clobber r0 there.

After EXCEPTION_SAVE_STATE r0 and r3-r12 are fair game, so yeah, r0 is fine. r1 points to your save area so I'd use "PMU_SAVE_STATE r0, r1", the macro does not save any state, but it will one day. You should also from the second argument (r1) until you have a patch that actually needs it.
-JX

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel