diff options
author | Monte Copeland <copelanm@us.ibm.com> | 2012-01-27 15:47:11 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-02-07 07:46:46 -0600 |
commit | 0e66c9caeba7e05a805e027f0d2aee91467b9174 (patch) | |
tree | d75ac9e11ee1d03141ea7591a9f759d69bfd864f /src/include/usr | |
parent | 73a45c77486bc82475c8d24739d1212ab8d9cfad (diff) | |
download | talos-hostboot-0e66c9caeba7e05a805e027f0d2aee91467b9174.tar.gz talos-hostboot-0e66c9caeba7e05a805e027f0d2aee91467b9174.zip |
Trace macro to clear all component trace buffers.
Change-Id: I938d142b40cce23aae0d6408c915a58cdd47d83e
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/631
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/trace/interface.H | 18 | ||||
-rw-r--r-- | src/include/usr/trace/trace.H | 17 |
2 files changed, 32 insertions, 3 deletions
diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H index 7b610931e..eb9ec184e 100644 --- a/src/include/usr/trace/interface.H +++ b/src/include/usr/trace/interface.H @@ -277,16 +277,28 @@ tracepp replaces trace_adal_hash() with hash value and reduced format string * descriptor which is used by the trace calls to find the correct * buffer to write to. * - * @param des This is assigned by this function. + * @param des A trac_desc_t * initialized to null by the using code. * @param comp_name This is the 15 character name of the component requesting - * the trace buffer. + * the trace buffer. Will be stored internally in upper case. * @param bufferSize Requested length of the buffer, if 0 is entered the user will - * get default buffer size. + * get default buffer size. Subject to maximum allowable size. * @return void */ #define TRAC_INIT_BUFFER(des,comp_name, bufferSize) \ TRACE::Trace::getTheInstance().initBuffer((des), (comp_name), (bufferSize)) + +#ifdef __HIDDEN_TRACEIF_CLEARBUFFER +/** + * @fn void TRAC_CLEAR_BUFFERS() + * @brief For all in-use component trace buffers, clear their contents. + * + * @return void +*/ +#define TRAC_CLEAR_BUFFERS() TRACE::Trace::getTheInstance().clearAllBuffers() +#endif + + /******************************************************************************* TRAC_INIT: Class for creating trace descriptor object. diff --git a/src/include/usr/trace/trace.H b/src/include/usr/trace/trace.H index 6caa472b5..c894157fc 100644 --- a/src/include/usr/trace/trace.H +++ b/src/include/usr/trace/trace.H @@ -166,6 +166,8 @@ public: const char* i_comp, size_t i_size ); + + /** * @brief Write component trace out to input buffer * @@ -240,6 +242,21 @@ public: uint64_t i_bufferSize ); +#if !defined(__HIDDEN_TRACEIF_CLEARBUFFER) +private: +#endif + + + + /** + * @brief Clear all component trace buffers. This has + * no effect on the merged buffer, aka tracBINARY. + * + * @return void + */ + void clearAllBuffers( ); + + protected: |