Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 1 | From 7cd4c46c4b6689dcd16f7667076283abf14ef575 Mon Sep 17 00:00:00 2001 |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 2 | From: Elizabeth Liner <eliner@us.ibm.com> |
| 3 | Date: Mon, 30 Mar 2015 12:41:45 -0500 |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 4 | Subject: [PATCH 08/10] Cap off the TRACFBIN such that nothing exceeds 64 bytes |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 5 | |
| 6 | Change-Id: If8f08d1602b4437aa0e72e6d2e8d99ca615a2c77 |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 7 | Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16762 |
| 8 | Tested-by: Jenkins Server |
| 9 | Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> |
| 10 | Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> |
| 11 | (cherry picked from commit 56ab0ee178b8277c4cc7e24e8535802821b4cba7) |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 12 | --- |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 13 | src/include/usr/trace/interface.H | 17 ++++++++++++----- |
| 14 | src/include/usr/trace/trace.H | 3 +++ |
| 15 | 2 files changed, 15 insertions(+), 5 deletions(-) |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 16 | |
| 17 | diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 18 | index 3ef8575..4115ec2 100644 |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 19 | --- a/src/include/usr/trace/interface.H |
| 20 | +++ b/src/include/usr/trace/interface.H |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 21 | @@ -218,13 +218,20 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 22 | */ |
| 23 | #define TRACFBIN(des,printf_string,address,len) \ |
| 24 | { \ |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 25 | + /*TODO: RTC 124618 - remove this block once issue is resolved*/ \ |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 26 | + uint16_t l_length = len; \ |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 27 | + if(l_length > MAX_WORKING_TRACBIN_SIZE) \ |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 28 | + { \ |
| 29 | + l_length = MAX_WORKING_TRACBIN_SIZE; \ |
| 30 | + TRACFCOMP(des,"Shrinking to max size in TRACFBIN"); \ |
| 31 | + } \ |
| 32 | __TRACE_HASH_STRUCTURES(printf_string); \ |
| 33 | TRACE::trace_adal_write_bin((des), \ |
| 34 | - &__traceData_codeInfo, \ |
| 35 | - __LINE__, \ |
| 36 | - address, \ |
| 37 | - len, \ |
| 38 | - TRACE_FIELD); \ |
| 39 | + &__traceData_codeInfo, \ |
| 40 | + __LINE__, \ |
| 41 | + address, \ |
| 42 | + l_length, \ |
| 43 | + TRACE_FIELD); \ |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | diff --git a/src/include/usr/trace/trace.H b/src/include/usr/trace/trace.H |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 48 | index fdcce88..bf5421c 100644 |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 49 | --- a/src/include/usr/trace/trace.H |
| 50 | +++ b/src/include/usr/trace/trace.H |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 51 | @@ -42,6 +42,9 @@ const uint32_t TRACE_DEBUG_OFF = 0; //< Set to this when debug trace off |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 52 | const uint32_t TRAC_COMP_SIZE = 16; //< Max component name size |
| 53 | const uint32_t TRAC_MAX_ARGS = 9; //< Max number of arguments in trace |
| 54 | |
Bill Hoffa | 41a142e | 2015-04-03 10:35:48 -0500 | [diff] [blame] | 55 | +//TODO: RTC 124618 - remove this block once issue is resolved |
Bill Hoffa | ffe8370 | 2015-03-30 21:37:20 -0500 | [diff] [blame] | 56 | +const uint16_t MAX_WORKING_TRACBIN_SIZE = 64; //< Max working tracBin size |
| 57 | + |
| 58 | typedef uint32_t trace_hash_val; //< Hash values are 32 bits. |
| 59 | |
| 60 | |
| 61 | -- |
| 62 | 1.8.2.2 |
| 63 | |