summaryrefslogtreecommitdiffstats
path: root/src/usr/trace
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-01-02 14:11:15 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-01-02 16:33:28 -0600
commit48d9ff25aa0886aaba13b3fde521aaeb87f2eea6 (patch)
tree2643e2951a585fde6b5bbd8e9e7872a685468043 /src/usr/trace
parentca398e209bc7f436162e294e4974d5aaff5c9fc5 (diff)
downloadtalos-hostboot-48d9ff25aa0886aaba13b3fde521aaeb87f2eea6.tar.gz
talos-hostboot-48d9ff25aa0886aaba13b3fde521aaeb87f2eea6.zip
TRACS override attribute for SCAN traces.
Change-Id: Ia2bd15babe8ad7bd25293e72a7285c0a278b89c2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2792 Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/trace')
-rw-r--r--src/usr/trace/compdesc.C19
-rw-r--r--src/usr/trace/service.C6
2 files changed, 21 insertions, 4 deletions
diff --git a/src/usr/trace/compdesc.C b/src/usr/trace/compdesc.C
index 92b306949..ddfd860dc 100644
--- a/src/usr/trace/compdesc.C
+++ b/src/usr/trace/compdesc.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -26,6 +26,8 @@
#include <string.h>
#include <string_ext.h>
+#include <targeting/common/commontargeting.H>
+
namespace TRACE
{
ComponentDesc::ComponentDesc(const char* i_comp, uint32_t i_size,
@@ -91,6 +93,21 @@ namespace TRACE
l_rc = &iv_components.back();
}
+ // Check for special SCAN component to force enable debug trace on.
+ if (0 == memcmp(l_compName, "SCAN", 5))
+ {
+ TARGETING::Target* sys = NULL;
+ TARGETING::targetService().getTopLevelTarget(sys);
+
+ TARGETING::HbSettings hbSettings =
+ sys->getAttr<TARGETING::ATTR_HB_SETTINGS>();
+
+ if (hbSettings.traceScanDebug)
+ {
+ l_rc->iv_debugEnabled = true;
+ }
+ }
+
mutex_unlock(&iv_mutex);
return l_rc;
}
diff --git a/src/usr/trace/service.C b/src/usr/trace/service.C
index 15c69cb7a..ad9105499 100644
--- a/src/usr/trace/service.C
+++ b/src/usr/trace/service.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -61,7 +61,7 @@ namespace TRACE
// Skip writing trace if debug is disabled.
if (unlikely(i_type == TRACE_DEBUG))
{
- if ((!i_td->iv_debugEnabled) ||
+ if ((!i_td->iv_debugEnabled) &&
(!g_debugSettings.globalDebugEnable))
{
return;
@@ -216,7 +216,7 @@ namespace TRACE
// Skip writing trace if debug is disabled.
if (unlikely(i_type == TRACE_DEBUG))
{
- if ((!i_td->iv_debugEnabled) ||
+ if ((!i_td->iv_debugEnabled) &&
(!g_debugSettings.globalDebugEnable))
{
return;
OpenPOWER on IntegriCloud