summaryrefslogtreecommitdiffstats
path: root/src/include/usr/trace/interface.H
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-05-23 19:36:35 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-12 09:48:43 -0500
commitb9c5a79eb89e837981f7743569b715923d8b4c75 (patch)
treeec7df5130219d926eb3d00ff5de453696a726ba4 /src/include/usr/trace/interface.H
parent1a0daf283888feaf77a2d7152b851498385b4491 (diff)
downloadblackbird-hostboot-b9c5a79eb89e837981f7743569b715923d8b4c75.tar.gz
blackbird-hostboot-b9c5a79eb89e837981f7743569b715923d8b4c75.zip
Eliminate tracepp!
Change-Id: I67a7d626c81b0b90e25057c486d490e6e2b5aede Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5132 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/trace/interface.H')
-rw-r--r--src/include/usr/trace/interface.H69
1 files changed, 48 insertions, 21 deletions
diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H
index 3fc72646d..6b7dee2f7 100644
--- a/src/include/usr/trace/interface.H
+++ b/src/include/usr/trace/interface.H
@@ -84,6 +84,17 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
#define __ALL_HASH(printf_string,num) trace_adal_hash(printf_string,num),printf_string
#endif
+#define __TRACE_HASH_STRUCTURES(str) \
+ static TRACE::traceCodeInfo __traceData_codeInfo \
+ __attribute((used)) = \
+ { NULL, 1 }; \
+ static TRACE::traceParseInfo __traceData_parseInfo \
+ __attribute((used)) = \
+ { sizeof(TRACE::traceParseInfo::string), \
+ sizeof(TRACE::traceParseInfo::file), 0, \
+ str, __FILE__, &__traceData_codeInfo }
+
+
/******************************************************************************/
// Macros
/******************************************************************************/
@@ -123,11 +134,14 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
/* a macro w/o the param number suffix. number is calculated from printf string */
#define TRACDCOMP(des,printf_string,args...) \
+ { \
+ __TRACE_HASH_STRUCTURES(printf_string); \
TRACE::trace_adal_write_all((des), \
- __ALL_HASH(printf_string,-1), \
+ &__traceData_codeInfo, \
__LINE__, \
TRACE_DEBUG, \
- ##args)
+ ##args); \
+ }
/**
@@ -145,13 +159,17 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
* @return void
*/
-#define TRACDBIN(des,printf_string,address,len) \
+#define TRACDBIN(des,printf_string,address,len) \
+ { \
+ __TRACE_HASH_STRUCTURES(printf_string); \
TRACE::trace_adal_write_bin((des), \
- __ALL_HASH(printf_string,0), \
- __LINE__, \
- address, \
- len, \
- TRACE_DEBUG)
+ __traceData_codeInfo.hash, \
+ __LINE__, \
+ address, \
+ len, \
+ TRACE_DEBUG); \
+ }
+
#endif /* HOSTBOOT_DEBUG */
#endif /* TRAC_DEBUG_OUT */
@@ -172,11 +190,14 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
/* a macro w/o the param number suffix. number is calculated from printf string */
#define TRACFCOMP(des,printf_string,args...) \
+ { \
+ __TRACE_HASH_STRUCTURES(printf_string); \
TRACE::trace_adal_write_all((des), \
- __ALL_HASH(printf_string,-1), \
+ &__traceData_codeInfo, \
__LINE__, \
TRACE_FIELD, \
- ##args)
+ ##args); \
+ }
/**
@@ -194,13 +215,15 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
* @return void
*/
#define TRACFBIN(des,printf_string,address,len) \
+ { \
+ __TRACE_HASH_STRUCTURES(printf_string); \
TRACE::trace_adal_write_bin((des), \
- __ALL_HASH(printf_string,0), \
- __LINE__, \
- address, \
- len, \
- TRACE_FIELD)
-
+ __traceData_codeInfo.hash, \
+ __LINE__, \
+ address, \
+ len, \
+ TRACE_FIELD); \
+ }
/**
@fn void TRACSCOMP(des, printf_string, args...)
@@ -223,11 +246,14 @@ tracepp replaces trace_adal_hash() with hash value and reduced format string
/* a macro w/o the param number suffix. number is calculated from printf string */
#define TRACSCOMP(des,printf_string,args...) \
- TRACE::trace_adal_write_all((des), \
- __ALL_HASH(printf_string,-1), \
- __LINE__, \
- TRACE_DEBUG, \
- ##args)
+ { \
+ __TRACE_HASH_STRUCTURES(printf_string); \
+ TRACE::trace_adal_write_all((des), \
+ &__traceData_codeInfo, \
+ __LINE__, \
+ TRACE_DEBUG, \
+ ##args); \
+ }
/**
@@ -369,6 +395,7 @@ class TracInit
};
+
}
OpenPOWER on IntegriCloud