| Summary: | add '#define xdc_runtime_Log_ENABLE' symbol (default 1) to allow compile out Log | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Karl Wechsler <karl> |
| Component: | Runtime | Assignee: | Chris McCormick <c-mccormick> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | d-russo |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:3.20.02 | ||
Implemented this enhancement in xdc-v44. The relevant symbols are documented in the Log module header CDOC. Verified by Karl per email shown below: ________________________________________ From: Wechsler, Karl Sent: Thursday, August 05, 2010 4:50 PM To: Mookerjee, Amit; Rowlands, Jon; Harris, Ramsey; Ring, Chris; Degraw, Yvonne; Ramdas, Nitya; McCormick, Chris Cc: Blake, Jon Subject: RE: Fix verify assignments for XDCtools 3.20.02 I verified all the bugs below but did not change state to verify pass. I changed state to “VERIFIED” for those that I could. Others don’t give me that option. I updated title of 318256 to say: update all C6x/ELF targets to use 7.1.0B2 compiler I found minor issue with the Log disable fix. I fixed it and will give Sasa a tdiff. 317380 add '#define xdc_runtime_Log_ENABLE' symbol (default 1) to allow compile out Log KarlW -Karl- Shipped in XDCtools 3.20.02 |
We need to enable users to build libraries without any Log overhead. I think we should add something like this: #ifndef xdc_runtime_Log' #define xdc_runtime_Log_ENABLE 1 #endif And then update all of Log macros to have this as conditional first check. I think this will cause most compilers to remove the Log call. We need to check. If not, then we'd have to have separate versions of each API. change this: #define xdc_runtime_Log_write0(evt) \ ((Module__LOGDEF && xdc_runtime_Diags_query(evt)) ? \ (xdc_runtime_Log_put0((evt), Module__MID)) : (void)0 \ ) to this: #define xdc_runtime_Log_write0(evt) \ ((xdc_runtime_Log_ENABLE && Module__LOGDEF && xdc_runtime_Diags_query(evt)) ? \ (xdc_runtime_Log_put0((evt), Module__MID)) : (void)0 \ ) This also needs to be added to the cdoc documentation.