diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-02-11 09:47:19 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-02-11 09:47:19 +0000 |
commit | e1b02119e639a9e13f79c99d145bf8a3c535593a (patch) | |
tree | 6218d66cc914d3462ada18ff5fb72f643c3624ba /xen/include/asm-x86/trace.h | |
parent | 1c8d4c1040bcfda0be3402025efe15c360c2c52d (diff) | |
download | xen-e1b02119e639a9e13f79c99d145bf8a3c535593a.tar.gz xen-e1b02119e639a9e13f79c99d145bf8a3c535593a.tar.bz2 xen-e1b02119e639a9e13f79c99d145bf8a3c535593a.zip |
xentrace: Remove redundant tb_done_init checks, and add missing ones.
Hand inspection of gcc -02 output confirms significantly shorter
codepaths for inactive (i.e. normal case) tracing.
Signed-off-by: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>
Diffstat (limited to 'xen/include/asm-x86/trace.h')
-rw-r--r-- | xen/include/asm-x86/trace.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xen/include/asm-x86/trace.h b/xen/include/asm-x86/trace.h index c8b13c4b86..e65b5de6ee 100644 --- a/xen/include/asm-x86/trace.h +++ b/xen/include/asm-x86/trace.h @@ -8,7 +8,7 @@ void __trace_pv_trap(int trapnr, unsigned long eip, static inline void trace_pv_trap(int trapnr, unsigned long eip, int use_error_code, unsigned error_code) { - if ( tb_init_done ) + if ( unlikely(tb_init_done) ) __trace_pv_trap(trapnr, eip, use_error_code, error_code); } @@ -16,14 +16,14 @@ void __trace_pv_page_fault(unsigned long addr, unsigned error_code); static inline void trace_pv_page_fault(unsigned long addr, unsigned error_code) { - if ( tb_init_done ) + if ( unlikely(tb_init_done) ) __trace_pv_page_fault(addr, error_code); } void __trace_trap_one_addr(unsigned event, unsigned long va); static inline void trace_trap_one_addr(unsigned event, unsigned long va) { - if ( tb_init_done ) + if ( unlikely(tb_init_done) ) __trace_trap_one_addr(event, va); } @@ -32,14 +32,14 @@ void __trace_trap_two_addr(unsigned event, unsigned long va1, static inline void trace_trap_two_addr(unsigned event, unsigned long va1, unsigned long va2) { - if ( tb_init_done ) + if ( unlikely(tb_init_done) ) __trace_trap_two_addr(event, va1, va2); } void __trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte); static inline void trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte) { - if ( tb_init_done ) + if ( unlikely(tb_init_done) ) __trace_ptwr_emulation(addr, npte); } |