| From 7cd4c46c4b6689dcd16f7667076283abf14ef575 Mon Sep 17 00:00:00 2001 |
| From: Elizabeth Liner <eliner@us.ibm.com> |
| Date: Mon, 30 Mar 2015 12:41:45 -0500 |
| Subject: [PATCH 08/10] Cap off the TRACFBIN such that nothing exceeds 64 bytes |
| |
| Change-Id: If8f08d1602b4437aa0e72e6d2e8d99ca615a2c77 |
| Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16762 |
| Tested-by: Jenkins Server |
| Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> |
| Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> |
| (cherry picked from commit 56ab0ee178b8277c4cc7e24e8535802821b4cba7) |
| --- |
| src/include/usr/trace/interface.H | 17 ++++++++++++----- |
| src/include/usr/trace/trace.H | 3 +++ |
| 2 files changed, 15 insertions(+), 5 deletions(-) |
| |
| diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H |
| index 3ef8575..4115ec2 100644 |
| --- a/src/include/usr/trace/interface.H |
| +++ b/src/include/usr/trace/interface.H |
| @@ -218,13 +218,20 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field |
| */ |
| #define TRACFBIN(des,printf_string,address,len) \ |
| { \ |
| + /*TODO: RTC 124618 - remove this block once issue is resolved*/ \ |
| + uint16_t l_length = len; \ |
| + if(l_length > MAX_WORKING_TRACBIN_SIZE) \ |
| + { \ |
| + l_length = MAX_WORKING_TRACBIN_SIZE; \ |
| + TRACFCOMP(des,"Shrinking to max size in TRACFBIN"); \ |
| + } \ |
| __TRACE_HASH_STRUCTURES(printf_string); \ |
| TRACE::trace_adal_write_bin((des), \ |
| - &__traceData_codeInfo, \ |
| - __LINE__, \ |
| - address, \ |
| - len, \ |
| - TRACE_FIELD); \ |
| + &__traceData_codeInfo, \ |
| + __LINE__, \ |
| + address, \ |
| + l_length, \ |
| + TRACE_FIELD); \ |
| } |
| |
| /** |
| diff --git a/src/include/usr/trace/trace.H b/src/include/usr/trace/trace.H |
| index fdcce88..bf5421c 100644 |
| --- a/src/include/usr/trace/trace.H |
| +++ b/src/include/usr/trace/trace.H |
| @@ -42,6 +42,9 @@ const uint32_t TRACE_DEBUG_OFF = 0; //< Set to this when debug trace off |
| const uint32_t TRAC_COMP_SIZE = 16; //< Max component name size |
| const uint32_t TRAC_MAX_ARGS = 9; //< Max number of arguments in trace |
| |
| +//TODO: RTC 124618 - remove this block once issue is resolved |
| +const uint16_t MAX_WORKING_TRACBIN_SIZE = 64; //< Max working tracBin size |
| + |
| typedef uint32_t trace_hash_val; //< Hash values are 32 bits. |
| |
| |
| -- |
| 1.8.2.2 |
| |