diff options
author | Van Lee <vanlee@us.ibm.com> | 2012-07-26 16:23:46 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-07-28 13:12:04 -0500 |
commit | 0a7124143589d15b534f7f2384fecc5a5cd0725f (patch) | |
tree | 7bc158c2de5cd2fbc8c31be7985e3c3c385a07ae /src/usr/trace | |
parent | 231afb3849500c234edaff59261a94a002535ca8 (diff) | |
download | talos-hostboot-0a7124143589d15b534f7f2384fecc5a5cd0725f.tar.gz talos-hostboot-0a7124143589d15b534f7f2384fecc5a5cd0725f.zip |
Maintain correct sequence number of the two continuous buffers under VPO
- Also add public function to flush continuous buffers under simics
Change-Id: I913e817cf3a4fd4dd88482c8e53a34873081295b
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1428
Tested-by: Jenkins Server
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: CAMVAN T. NGUYEN <ctnguyen@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/trace.C | 67 |
1 files changed, 43 insertions, 24 deletions
diff --git a/src/usr/trace/trace.C b/src/usr/trace/trace.C index 398f6c418..f0d2c9ad9 100644 --- a/src/usr/trace/trace.C +++ b/src/usr/trace/trace.C @@ -1,26 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/trace/trace.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END - +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/usr/trace/trace.C $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ /** * @file trace.C * @@ -141,7 +141,7 @@ struct vpo_cont_support_t // at compile time to 1. The VPO script set the enable variable at the // start to enable the continuous trace support for VPO. It then montiors the // trigger active bit of each buffer and take action. -vpo_cont_support_t g_cont_trace_trigger_info = { { {0,0,0}, {0,0,0} }, 1 }; +vpo_cont_support_t g_cont_trace_trigger_info = { { {0,0,0}, {0,0,1} }, 1 }; const uint64_t TRIGGER_ACTIVE_BIT = 0x8000000000000000; @@ -450,6 +450,7 @@ void Trace::ManageContTraceBuffers(uint64_t i_cbRequired) } g_cont_trace_trigger_info.triggers[iv_CurBuf].seq = iv_seqNum++; + g_cont_trace_trigger_info.triggers[l_AltBuf].seq = iv_seqNum; // Turn on the current buffer's trigger g_cont_trace_trigger_info.triggers[iv_CurBuf].trig |= TRIGGER_ACTIVE_BIT; @@ -1476,6 +1477,24 @@ void Trace::clearAllBuffers() } +/******************************************************************************/ +// flushContBuffers() +/******************************************************************************/ +void Trace::flushContBuffers() +{ + getTheInstance()._flushContBuffers(); +} + +/******************************************************************************/ +// _flushContBuffers() +/******************************************************************************/ +void Trace::_flushContBuffers() +{ + mutex_lock(&iv_trac_mutex); + MAGIC_INSTRUCTION(MAGIC_CONTINUOUS_TRACE); + mutex_unlock(&iv_trac_mutex); +} + #if 0 /******************************************************************************/ |