diff options
author | Mike Baiocchi <baiocchi@us.ibm.com> | 2015-08-12 23:58:32 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-08-21 06:53:43 -0500 |
commit | 871fb2de70dbf80af6b68a9eb27c3641a89fdc39 (patch) | |
tree | 599b0fb8a5c8f6aa052c6d73ac1d93c369a14936 | |
parent | 913f40b36e80ba7d2a020b7fc92873da0b1e23d5 (diff) | |
download | talos-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>
-rwxr-xr-x | src/build/tools/hbGenConfig | 16 | ||||
-rw-r--r-- | src/usr/trace/HBconfig | 8 | ||||
-rw-r--r-- | src/usr/trace/service.C | 10 |
3 files changed, 29 insertions, 5 deletions
diff --git a/src/build/tools/hbGenConfig b/src/build/tools/hbGenConfig index d33b086f7..f846faa3c 100755 --- a/src/build/tools/hbGenConfig +++ b/src/build/tools/hbGenConfig @@ -6,7 +6,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2014 +# Contributors Listed Below - COPYRIGHT 2014,2015 # [+] International Business Machines Corp. # # @@ -137,9 +137,17 @@ sub parseOverride chomp $line; $line =~ s/#.*//; - if ($line =~ m/^\s*set\s*(\S*)/) + if ($line =~ m/^\s*set\s*(\S*)\s*(.*)/) { - $config_set{$1} = 1; + if ( $2 eq "" ) + { + $config_set{$1} = 1; + } + else + { + $config_set{$1} = $2; + } + } elsif ($line =~ m/^\s*unset\s*(\S*)/) { @@ -258,7 +266,7 @@ sub outputResults if ($config_set{$option}) { print CONFIGMK "CONFIG_$option = yes\n"; - print CONFIGH "#define CONFIG_$option 1\n"; + print CONFIGH "#define CONFIG_$option $config_set{$option}\n"; } else { 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 |