diff options
| author | Monte Copeland <copelanm@us.ibm.com> | 2011-10-24 09:30:49 -0500 |
|---|---|---|
| committer | Monte K. Copeland <copelanm@us.ibm.com> | 2011-10-31 11:07:10 -0500 |
| commit | 723239d5a14fe82713a2aa57fef3130534b15a41 (patch) | |
| tree | b6d19b1d1d66ec9ea4acd19c0dfdb47bcf86babd /src/include/usr/trace | |
| parent | f2794eed87ca9c35140c601dfcbb5baf299d834b (diff) | |
| download | blackbird-hostboot-723239d5a14fe82713a2aa57fef3130534b15a41.tar.gz blackbird-hostboot-723239d5a14fe82713a2aa57fef3130534b15a41.zip | |
Error log changes for Sprint 6
Change-Id: I44ad678cfae8cd84e5370391dc7e20d74f59c9ca
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/449
Tested-by: Jenkins Server
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: Monte K. Copeland <copelanm@us.ibm.com>
Diffstat (limited to 'src/include/usr/trace')
| -rw-r--r-- | src/include/usr/trace/trace.H | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/src/include/usr/trace/trace.H b/src/include/usr/trace/trace.H index cb4277603..c5d0a0d2a 100644 --- a/src/include/usr/trace/trace.H +++ b/src/include/usr/trace/trace.H @@ -40,6 +40,7 @@ #include <sys/sync.h> #include <stdarg.h> + /******************************************************************************/ // Globals/Constants /******************************************************************************/ @@ -137,6 +138,9 @@ typedef Singleton<Trace> theTrace; */ class Trace { + /* ErrlEntry will call getBuffer() */ + friend class ErrlEntry; + public: /** @@ -200,6 +204,31 @@ public: const uint32_t i_size, const int32_t i_type); + + /** + * @brief Retrieve full trace buffer for component i_comp. + * + * Caller must allocate memory for the output buffer. Caller may + * first query the size of the buffer by calling with the desired + * component/trace buffer name and with o_data null and with i_bufferSize + * zero. The value returned will be the buffer size. Caller then + * allocates the buffer and calls again. + * + * @param [in] i_pComp pointer to name string + * @param [out] o_data pointer to where data will be stored + * @param [in] i_bufferSize size of buffer in bytes + * + * @return Count of bytes copied, or if given null parameters, + * the size of the buffer, or else zero for error, perhaps the + * component name/trace buffer name is not found. + */ + uint64_t getBuffer( const char * i_pComp, + void * o_data, + uint64_t i_bufferSize ); + + + + protected: /** @@ -212,6 +241,10 @@ protected: */ ~Trace(); + + + + private: /** @@ -248,21 +281,6 @@ private: const uint32_t i_size); - /** - * @brief Retrieve full trace buffer for component i_comp - * - * This function assumes memory has already been allocated for - * the full trace buffer in o_data. - * - * @param [in] i_td_ptr Trace descriptor of buffer to retrieve. - * @param [out] o_data Pre-allocated pointer to where data will be stored. - * - * TODO - Not Supported Yet - * - * @return Non-zero return code on error - */ - int32_t getBuffer(const trace_desc_t * i_td_ptr, - void *o_data); /** * @brief Retrieve partial trace buffer for component i_comp |

