blob: fd60ef309e0891e563936d9bd6392f3d01bc7308 [file] [log] [blame]
Bill Hoffa41a142e2015-04-03 10:35:48 -05001From 7cd4c46c4b6689dcd16f7667076283abf14ef575 Mon Sep 17 00:00:00 2001
Bill Hoffaffe83702015-03-30 21:37:20 -05002From: Elizabeth Liner <eliner@us.ibm.com>
3Date: Mon, 30 Mar 2015 12:41:45 -0500
Bill Hoffa41a142e2015-04-03 10:35:48 -05004Subject: [PATCH 08/10] Cap off the TRACFBIN such that nothing exceeds 64 bytes
Bill Hoffaffe83702015-03-30 21:37:20 -05005
6Change-Id: If8f08d1602b4437aa0e72e6d2e8d99ca615a2c77
Bill Hoffa41a142e2015-04-03 10:35:48 -05007Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16762
8Tested-by: Jenkins Server
9Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
10Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
11(cherry picked from commit 56ab0ee178b8277c4cc7e24e8535802821b4cba7)
Bill Hoffaffe83702015-03-30 21:37:20 -050012---
Bill Hoffa41a142e2015-04-03 10:35:48 -050013 src/include/usr/trace/interface.H | 17 ++++++++++++-----
14 src/include/usr/trace/trace.H | 3 +++
15 2 files changed, 15 insertions(+), 5 deletions(-)
Bill Hoffaffe83702015-03-30 21:37:20 -050016
17diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H
Bill Hoffa41a142e2015-04-03 10:35:48 -050018index 3ef8575..4115ec2 100644
Bill Hoffaffe83702015-03-30 21:37:20 -050019--- a/src/include/usr/trace/interface.H
20+++ b/src/include/usr/trace/interface.H
Bill Hoffa41a142e2015-04-03 10:35:48 -050021@@ -218,13 +218,20 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
Bill Hoffaffe83702015-03-30 21:37:20 -050022 */
23 #define TRACFBIN(des,printf_string,address,len) \
24 { \
Bill Hoffa41a142e2015-04-03 10:35:48 -050025+ /*TODO: RTC 124618 - remove this block once issue is resolved*/ \
Bill Hoffaffe83702015-03-30 21:37:20 -050026+ uint16_t l_length = len; \
Bill Hoffa41a142e2015-04-03 10:35:48 -050027+ if(l_length > MAX_WORKING_TRACBIN_SIZE) \
Bill Hoffaffe83702015-03-30 21:37:20 -050028+ { \
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 /**
47diff --git a/src/include/usr/trace/trace.H b/src/include/usr/trace/trace.H
Bill Hoffa41a142e2015-04-03 10:35:48 -050048index fdcce88..bf5421c 100644
Bill Hoffaffe83702015-03-30 21:37:20 -050049--- a/src/include/usr/trace/trace.H
50+++ b/src/include/usr/trace/trace.H
Bill Hoffa41a142e2015-04-03 10:35:48 -050051@@ -42,6 +42,9 @@ const uint32_t TRACE_DEBUG_OFF = 0; //< Set to this when debug trace off
Bill Hoffaffe83702015-03-30 21:37:20 -050052 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 Hoffa41a142e2015-04-03 10:35:48 -050055+//TODO: RTC 124618 - remove this block once issue is resolved
Bill Hoffaffe83702015-03-30 21:37:20 -050056+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--
621.8.2.2
63