diff options
author | Doug Gilbert <dgilbert@us.ibm.com> | 2016-06-02 15:41:34 -0500 |
---|---|---|
committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 16:09:54 -0500 |
commit | 815c6ac0bc104f5b1bc64273afaf0b9133a2aefe (patch) | |
tree | a0e7012e136c8f7ab1f0f84766eef1dd4a444f8c /import/chips/p9/procedures/ppe | |
parent | 8ddb1634315becfa172173a4b59fc59ae28f0f49 (diff) | |
download | talos-hcode-815c6ac0bc104f5b1bc64273afaf0b9133a2aefe.tar.gz talos-hcode-815c6ac0bc104f5b1bc64273afaf0b9133a2aefe.zip |
Add PK_TRACE_CRIT and PK_TRACE_DBG_SUPPRESS trace directives
Change-Id: Ie77655258f5d5b78da0e71a96a97ddf4b442af5a
RTC: 154819
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25322
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: YUE DU <daviddu@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/ppe')
-rw-r--r-- | import/chips/p9/procedures/ppe/pk/kernel/pk_api.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h b/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h index 4537f2f1..625dd65f 100644 --- a/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h +++ b/import/chips/p9/procedures/ppe/pk/kernel/pk_api.h @@ -384,13 +384,44 @@ #define PK_TRACE_ENABLE 1 #endif +/// Enable PK crit (disabled by default) +#ifndef PK_TRACE_CRIT_ENABLE + #define PK_TRACE_CRIT_ENABLE 0 +#endif + +/// Enable Debug suppress (disabled by default) +// a.k.a. enabled means turn off PK_TRACE(), but keep crit trace +#ifndef PK_TRACE_DBG_SUPPRESS + #define PK_TRACE_DBG_SUPPRESS 0 +#endif + /// Enable PK kernel tracing (disabled by default) #ifndef PK_KERNEL_TRACE_ENABLE #define PK_KERNEL_TRACE_ENABLE 0 #endif -//Application trace macros +/// pk trace disabled implies no tracing at all +// override any other trace settings #if !PK_TRACE_ENABLE + #undef PK_TRACE_DBG_SUPPRESS + #undef PK_TRACE_CRIT_ENABLE + + #define PK_TRACE_DBG_SUPPRESS 1 + #define PK_TRACE_CRIT_ENABLE 0 +#endif + +// PK TRACE enabled & PK CRIT enabled implies all tracing on. +// PK TRACE enabled & PK DBUG disabled implies PK CRIT INFO tracing only. +// PK TRACE enable & pK CRIT INFO disabled && PK DBUG disabled implies +// PK TRACE disabled +#if PK_TRACE_ENABLE && PK_TRACE_DBG_SUPPRESS && !PK_TRACE_CRIT_ENABLE + #undef PK_TRACE_ENABLE + #define PK_TRACE_ENABLE 0 +#endif + + +//Application trace macros +#if PK_TRACE_DBG_SUPPRESS #define PK_TRACE(...) #define PK_TRACE_BIN(str, bufp, buf_size) #else @@ -398,6 +429,11 @@ #define PK_TRACE_BIN(str, bufp, buf_size) PKTRACE_BIN(str, bufp, buf_size) #endif +#if !PK_TRACE_CRIT_ENABLE + #define PK_TRACE_INF(...) +#else + #define PK_TRACE_INF(...) PKTRACE(__VA_ARGS__) +#endif //Kernel trace macros #if !PK_KERNEL_TRACE_ENABLE @@ -438,7 +474,7 @@ #define TINY_TRACE_ASM6() .error "too many parameters" #define TINY_TRACE_ASM7() .error "too many parameters" -//TODO: add support for tracing more than 1 parameter and binary data in assembly +//Possible enhancement: add support for tracing more than 1 parameter and binary data in assembly .global pk_trace_tiny |