summaryrefslogtreecommitdiffstats
path: root/src/usr/trace
diff options
context:
space:
mode:
authorMike Baiocchi <baiocchi@us.ibm.com>2015-08-12 23:58:32 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-08-21 06:53:43 -0500
commit871fb2de70dbf80af6b68a9eb27c3641a89fdc39 (patch)
tree599b0fb8a5c8f6aa052c6d73ac1d93c369a14936 /src/usr/trace
parent913f40b36e80ba7d2a020b7fc92873da0b1e23d5 (diff)
downloadtalos-hostboot-871fb2de70dbf80af6b68a9eb27c3641a89fdc39.tar.gz
talos-hostboot-871fb2de70dbf80af6b68a9eb27c3641a89fdc39.zip
Option to Limit Console Output Trace To Single Component
This commit limits the console output trace to a single component, as defined by the config file. CONSOLE_OUTPUT_TRACE needs to be set and CONSOLE_OUTPUT_TRACE_COMP_NAME needs to have a string value assigned to it in the config file. Change-Id: Ia04b61f3b7b0dcad7a907b86cf8db70a35214ab1 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19820 Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/trace')
-rw-r--r--src/usr/trace/HBconfig8
-rw-r--r--src/usr/trace/service.C10
2 files changed, 17 insertions, 1 deletions
diff --git a/src/usr/trace/HBconfig b/src/usr/trace/HBconfig
index b2a395e15..6aacf8ddb 100644
--- a/src/usr/trace/HBconfig
+++ b/src/usr/trace/HBconfig
@@ -3,3 +3,11 @@ config CONSOLE_OUTPUT_TRACE
depends on CONSOLE
help
Enables output of trace to console.
+
+config CONSOLE_OUTPUT_TRACE_COMP_NAME
+ default n
+ depends on CONSOLE_OUTPUT_TRACE
+ help
+ Limits console output trace to a specific component by name.
+ User needs to add to the config file:
+ set CONSOLE_OUTPUT_TRACE_COMP_NAME "<component_string_name>"
diff --git a/src/usr/trace/service.C b/src/usr/trace/service.C
index 857ed0a6c..6606448c8 100644
--- a/src/usr/trace/service.C
+++ b/src/usr/trace/service.C
@@ -79,7 +79,15 @@ namespace TRACE
{
va_list args;
va_copy(args, i_args);
- CONSOLE::vdisplayf(i_td->iv_compName, i_fmt, i_args);
+ #ifdef CONFIG_CONSOLE_OUTPUT_TRACE_COMP_NAME
+ if ( !strcmp(i_td->iv_compName,
+ CONFIG_CONSOLE_OUTPUT_TRACE_COMP_NAME) )
+ {
+ #endif
+ CONSOLE::vdisplayf(i_td->iv_compName, i_fmt, i_args);
+ #ifdef CONFIG_CONSOLE_OUTPUT_TRACE_COMP_NAME
+ }
+ #endif
va_end(args);
}
#endif
OpenPOWER on IntegriCloud