diff mbox

[PATCHv2,2/2] Makefile.inc: ODP_DEBUG=no to disable ODP_DBG macro

Message ID 1399409980-465-3-git-send-email-anders.roxell@linaro.org
State Superseded
Headers show

Commit Message

Anders Roxell May 6, 2014, 8:59 p.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 Makefile.inc | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ciprian Barbu May 7, 2014, 7:29 a.m. UTC | #1
HI,


On Tue, May 6, 2014 at 11:59 PM, Anders Roxell <anders.roxell@linaro.org>wrote:

> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  Makefile.inc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Makefile.inc b/Makefile.inc
> index 6b292ce..fba4d45 100644
> --- a/Makefile.inc
> +++ b/Makefile.inc
> @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>  RM     := rm -f
>  COPY   := cp -r
>
> +ifeq ($(ODP_DEBUG),no)
> +EXTRA_CFLAGS += -DODP_DEBUG=0
> +else
>  EXTRA_CFLAGS += -DODP_DEBUG=1
> +endif
>

I think we should consider changing the name of ODP_DEBUG to reflect that
they are log traces, it's confusing having two Makefile variables called
*DEBUG. I remember we talked about introducing a multi-level trace
mechanism in odp, so maybe we should try doing that for a change.

>
>  ifeq ($(DEBUG),yes)
>  EXTRA_CFLAGS += -O0 -g
> --
> 1.9.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>

/Ciprian
Anders Roxell May 7, 2014, 8:48 a.m. UTC | #2
On 7 May 2014 09:29, Ciprian Barbu <ciprian.barbu@linaro.org> wrote:

> HI,
>
>
> On Tue, May 6, 2014 at 11:59 PM, Anders Roxell <anders.roxell@linaro.org>wrote:
>
>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>> ---
>>  Makefile.inc | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Makefile.inc b/Makefile.inc
>> index 6b292ce..fba4d45 100644
>> --- a/Makefile.inc
>> +++ b/Makefile.inc
>> @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>>  RM     := rm -f
>>  COPY   := cp -r
>>
>> +ifeq ($(ODP_DEBUG),no)
>> +EXTRA_CFLAGS += -DODP_DEBUG=0
>> +else
>>  EXTRA_CFLAGS += -DODP_DEBUG=1
>> +endif
>>
>
> I think we should consider changing the name of ODP_DEBUG to reflect that
> they are log traces, it's confusing having two Makefile variables called
> *DEBUG. I remember we talked about introducing a multi-level trace
> mechanism in odp, so maybe we should try doing that for a change.
>

I agree... maybe call it ODP_TRACE?


>
>>  ifeq ($(DEBUG),yes)
>>  EXTRA_CFLAGS += -O0 -g
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
> /Ciprian
>
Maxim Uvarov May 7, 2014, 11:12 a.m. UTC | #3
On 05/07/2014 12:48 PM, Anders Roxell wrote:
>
>
>
> On 7 May 2014 09:29, Ciprian Barbu <ciprian.barbu@linaro.org 
> <mailto:ciprian.barbu@linaro.org>> wrote:
>
>     HI,
>
>
>     On Tue, May 6, 2014 at 11:59 PM, Anders Roxell
>     <anders.roxell@linaro.org <mailto:anders.roxell@linaro.org>> wrote:
>
>         Signed-off-by: Anders Roxell <anders.roxell@linaro.org
>         <mailto:anders.roxell@linaro.org>>
>         ---
>          Makefile.inc | 4 ++++
>          1 file changed, 4 insertions(+)
>
>         diff --git a/Makefile.inc b/Makefile.inc
>         index 6b292ce..fba4d45 100644
>         --- a/Makefile.inc
>         +++ b/Makefile.inc
>         @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>          RM     := rm -f
>          COPY   := cp -r
>
>         +ifeq ($(ODP_DEBUG),no)
>         +EXTRA_CFLAGS += -DODP_DEBUG=0
>         +else
>          EXTRA_CFLAGS += -DODP_DEBUG=1
>         +endif
>
>
>     I think we should consider changing the name of ODP_DEBUG to
>     reflect that they are log traces, it's confusing having two
>     Makefile variables called *DEBUG. I remember we talked about
>     introducing a multi-level trace mechanism in odp, so maybe we
>     should try doing that for a change.
>
>
> I agree... maybe call it ODP_TRACE?

How about ODP_DEBUG_PRINT ?
>
>
>          ifeq ($(DEBUG),yes)
>          EXTRA_CFLAGS += -O0 -g
>         --
>         1.9.1
>
>
>         _______________________________________________
>         lng-odp mailing list
>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>         http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>     /Ciprian
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
Mike Holmes May 7, 2014, 3:27 p.m. UTC | #4
we have two printing functions ODP_DBG and ODP_ERR

/**
 * Debug printing macro, which prints output when DEBUG flag is set.
 */
#define ODP_DBG(fmt, ...) \
do { if (ODP_DEBUG == 1) printf(fmt, ##__VA_ARGS__); } while (0)

I think this should be enabled with ODP_DEBUG_PRINT to allow other debug
capabilities to be independently enabled - as with the "-O0 -g". To my mind
ODP_TRACE implies that enables trace points in the code and is not as good
a name.


Then we have ODP_ERR  should this be enabled by ODP_DEBUG_PRINT as well ?
Presumably ODP_ERR is always active, but could be defined as a NOP if it is
not redirected to another logging mechanism by any given implementation.
Or do we consider the information it provides a critical part of the API
that apps can depend on ?
/**
 * Print output to stderr (file, line and function).
 */
#define ODP_ERR(fmt, ...) \
fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
__LINE__, __func__, ##__VA_ARGS__)

I will capture the rationale for these in the arch doc when we decide.


On 7 May 2014 07:12, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> On 05/07/2014 12:48 PM, Anders Roxell wrote:
>
>>
>>
>>
>> On 7 May 2014 09:29, Ciprian Barbu <ciprian.barbu@linaro.org <mailto:
>> ciprian.barbu@linaro.org>> wrote:
>>
>>     HI,
>>
>>
>>     On Tue, May 6, 2014 at 11:59 PM, Anders Roxell
>>     <anders.roxell@linaro.org <mailto:anders.roxell@linaro.org>> wrote:
>>
>>         Signed-off-by: Anders Roxell <anders.roxell@linaro.org
>>         <mailto:anders.roxell@linaro.org>>
>>
>>         ---
>>          Makefile.inc | 4 ++++
>>          1 file changed, 4 insertions(+)
>>
>>         diff --git a/Makefile.inc b/Makefile.inc
>>         index 6b292ce..fba4d45 100644
>>         --- a/Makefile.inc
>>         +++ b/Makefile.inc
>>         @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>>          RM     := rm -f
>>          COPY   := cp -r
>>
>>         +ifeq ($(ODP_DEBUG),no)
>>         +EXTRA_CFLAGS += -DODP_DEBUG=0
>>         +else
>>          EXTRA_CFLAGS += -DODP_DEBUG=1
>>         +endif
>>
>>
>>     I think we should consider changing the name of ODP_DEBUG to
>>     reflect that they are log traces, it's confusing having two
>>     Makefile variables called *DEBUG. I remember we talked about
>>     introducing a multi-level trace mechanism in odp, so maybe we
>>     should try doing that for a change.
>>
>>
>> I agree... maybe call it ODP_TRACE?
>>
>
> How about ODP_DEBUG_PRINT ?
>
>>
>>
>>          ifeq ($(DEBUG),yes)
>>          EXTRA_CFLAGS += -O0 -g
>>         --
>>         1.9.1
>>
>>
>>         _______________________________________________
>>         lng-odp mailing list
>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>     /Ciprian
>>
>>
>>
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Ciprian Barbu May 8, 2014, 10:17 a.m. UTC | #5
On Wed, May 7, 2014 at 6:27 PM, Mike Holmes <mike.holmes@linaro.org> wrote:

> we have two printing functions ODP_DBG and ODP_ERR
>
> /**
>  * Debug printing macro, which prints output when DEBUG flag is set.
>  */
> #define ODP_DBG(fmt, ...) \
>  do { if (ODP_DEBUG == 1) printf(fmt, ##__VA_ARGS__); } while (0)
>
> I think this should be enabled with ODP_DEBUG_PRINT to allow other debug
> capabilities to be independently enabled - as with the "-O0 -g". To my mind
> ODP_TRACE implies that enables trace points in the code and is not as good
> a name.
>

Why is a trace different from a debug message?
http://en.wikipedia.org/wiki/Tracing_(software)

>
>
> Then we have ODP_ERR  should this be enabled by ODP_DEBUG_PRINT as well ?
> Presumably ODP_ERR is always active, but could be defined as a NOP if it is
> not redirected to another logging mechanism by any given implementation.
> Or do we consider the information it provides a critical part of the API
> that apps can depend on ?
> /**
>  * Print output to stderr (file, line and function).
>  */
> #define ODP_ERR(fmt, ...) \
>  fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
> __LINE__, __func__, ##__VA_ARGS__)
>

On certain platforms you might not have any kind of error message storing
(not even stdout) so I would say it's platform dependent. On linux-generic
ODP_ERR could be level 1 of tracing, where the trace level would be set by
default to 1, but could be configurable to 0 if wanted. Something like
ODP_DEBUG_PRINT_LEVEL=1 by default and ODP_ERR=1, ODP_DBG=2.


>
> I will capture the rationale for these in the arch doc when we decide.
>
>
> On 7 May 2014 07:12, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
>
>> On 05/07/2014 12:48 PM, Anders Roxell wrote:
>>
>>>
>>>
>>>
>>> On 7 May 2014 09:29, Ciprian Barbu <ciprian.barbu@linaro.org <mailto:
>>> ciprian.barbu@linaro.org>> wrote:
>>>
>>>     HI,
>>>
>>>
>>>     On Tue, May 6, 2014 at 11:59 PM, Anders Roxell
>>>     <anders.roxell@linaro.org <mailto:anders.roxell@linaro.org>> wrote:
>>>
>>>         Signed-off-by: Anders Roxell <anders.roxell@linaro.org
>>>         <mailto:anders.roxell@linaro.org>>
>>>
>>>         ---
>>>          Makefile.inc | 4 ++++
>>>          1 file changed, 4 insertions(+)
>>>
>>>         diff --git a/Makefile.inc b/Makefile.inc
>>>         index 6b292ce..fba4d45 100644
>>>         --- a/Makefile.inc
>>>         +++ b/Makefile.inc
>>>         @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>>>          RM     := rm -f
>>>          COPY   := cp -r
>>>
>>>         +ifeq ($(ODP_DEBUG),no)
>>>         +EXTRA_CFLAGS += -DODP_DEBUG=0
>>>         +else
>>>          EXTRA_CFLAGS += -DODP_DEBUG=1
>>>         +endif
>>>
>>>
>>>     I think we should consider changing the name of ODP_DEBUG to
>>>     reflect that they are log traces, it's confusing having two
>>>     Makefile variables called *DEBUG. I remember we talked about
>>>     introducing a multi-level trace mechanism in odp, so maybe we
>>>     should try doing that for a change.
>>>
>>>
>>> I agree... maybe call it ODP_TRACE?
>>>
>>
>> How about ODP_DEBUG_PRINT ?
>>
>>>
>>>
>>>          ifeq ($(DEBUG),yes)
>>>          EXTRA_CFLAGS += -O0 -g
>>>         --
>>>         1.9.1
>>>
>>>
>>>         _______________________________________________
>>>         lng-odp mailing list
>>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>>
>>>     /Ciprian
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
>
> --
> *Mike Holmes*
> Linaro Technical Manager / Lead
> LNG - ODP
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Bill Fischofer May 8, 2014, 10:34 a.m. UTC | #6
Since ODP is a framework and real-world applications that use it will
undoubtedly have their own error-reporting and logging schemes, ODP itself
should avoid reporting runtime error conditions via any means other than
standard return codes to callers unless there are specific debug flags
present for debugging ODP itself.

So I'd say both of these should be under ODP_DEBUG_PRINT control.

Bill


On Thu, May 8, 2014 at 5:17 AM, Ciprian Barbu <ciprian.barbu@linaro.org>wrote:

>
>
>
> On Wed, May 7, 2014 at 6:27 PM, Mike Holmes <mike.holmes@linaro.org>wrote:
>
>> we have two printing functions ODP_DBG and ODP_ERR
>>
>> /**
>>  * Debug printing macro, which prints output when DEBUG flag is set.
>>  */
>> #define ODP_DBG(fmt, ...) \
>>  do { if (ODP_DEBUG == 1) printf(fmt, ##__VA_ARGS__); } while (0)
>>
>> I think this should be enabled with ODP_DEBUG_PRINT to allow other debug
>> capabilities to be independently enabled - as with the "-O0 -g". To my mind
>> ODP_TRACE implies that enables trace points in the code and is not as good
>> a name.
>>
>
> Why is a trace different from a debug message?
> http://en.wikipedia.org/wiki/Tracing_(software)
>
>>
>>
>> Then we have ODP_ERR  should this be enabled by ODP_DEBUG_PRINT as well ?
>> Presumably ODP_ERR is always active, but could be defined as a NOP if it is
>> not redirected to another logging mechanism by any given implementation.
>> Or do we consider the information it provides a critical part of the API
>> that apps can depend on ?
>> /**
>>  * Print output to stderr (file, line and function).
>>  */
>> #define ODP_ERR(fmt, ...) \
>>  fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
>> __LINE__, __func__, ##__VA_ARGS__)
>>
>
> On certain platforms you might not have any kind of error message storing
> (not even stdout) so I would say it's platform dependent. On linux-generic
> ODP_ERR could be level 1 of tracing, where the trace level would be set by
> default to 1, but could be configurable to 0 if wanted. Something like
> ODP_DEBUG_PRINT_LEVEL=1 by default and ODP_ERR=1, ODP_DBG=2.
>
>
>>
>> I will capture the rationale for these in the arch doc when we decide.
>>
>>
>> On 7 May 2014 07:12, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
>>
>>> On 05/07/2014 12:48 PM, Anders Roxell wrote:
>>>
>>>>
>>>>
>>>>
>>>> On 7 May 2014 09:29, Ciprian Barbu <ciprian.barbu@linaro.org <mailto:
>>>> ciprian.barbu@linaro.org>> wrote:
>>>>
>>>>     HI,
>>>>
>>>>
>>>>     On Tue, May 6, 2014 at 11:59 PM, Anders Roxell
>>>>     <anders.roxell@linaro.org <mailto:anders.roxell@linaro.org>> wrote:
>>>>
>>>>         Signed-off-by: Anders Roxell <anders.roxell@linaro.org
>>>>         <mailto:anders.roxell@linaro.org>>
>>>>
>>>>         ---
>>>>          Makefile.inc | 4 ++++
>>>>          1 file changed, 4 insertions(+)
>>>>
>>>>         diff --git a/Makefile.inc b/Makefile.inc
>>>>         index 6b292ce..fba4d45 100644
>>>>         --- a/Makefile.inc
>>>>         +++ b/Makefile.inc
>>>>         @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>>>>          RM     := rm -f
>>>>          COPY   := cp -r
>>>>
>>>>         +ifeq ($(ODP_DEBUG),no)
>>>>         +EXTRA_CFLAGS += -DODP_DEBUG=0
>>>>         +else
>>>>          EXTRA_CFLAGS += -DODP_DEBUG=1
>>>>         +endif
>>>>
>>>>
>>>>     I think we should consider changing the name of ODP_DEBUG to
>>>>     reflect that they are log traces, it's confusing having two
>>>>     Makefile variables called *DEBUG. I remember we talked about
>>>>     introducing a multi-level trace mechanism in odp, so maybe we
>>>>     should try doing that for a change.
>>>>
>>>>
>>>> I agree... maybe call it ODP_TRACE?
>>>>
>>>
>>> How about ODP_DEBUG_PRINT ?
>>>
>>>>
>>>>
>>>>          ifeq ($(DEBUG),yes)
>>>>          EXTRA_CFLAGS += -O0 -g
>>>>         --
>>>>         1.9.1
>>>>
>>>>
>>>>         _______________________________________________
>>>>         lng-odp mailing list
>>>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>
>>>>
>>>>     /Ciprian
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> lng-odp mailing list
>>>> lng-odp@lists.linaro.org
>>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>
>>>
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>>
>>
>> --
>> *Mike Holmes*
>> Linaro Technical Manager / Lead
>> LNG - ODP
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Mike Holmes May 8, 2014, 2:24 p.m. UTC | #7
Since ODP is a framework and real-world applications that use it will
undoubtedly have their own error-reporting and logging schemes, ODP itself
should avoid reporting runtime error conditions via any means other than
standard return codes to callers unless there are specific debug flags
present for debugging ODP itself.

I agree that applications must use return codes,  but I do think that most
applications gather logs for supplementing the return code when failures
cascade. So I think there is a need to disable prints and
errors independently, and to that end if we add trace points
they should also be independently enabled.
I dont think we should add levels, but we may need to be able to enable per
API grouping. i.e. Crpto only tracing for example to limit the overhead.

int fn (void)
{
   odp_trace("entered %s", __FUNC__);  <--- a trace

.....
.....
   ODP_PRINT(" 12  elephants seen");  <--- a print
....
....
  if (elephants == 0)
{
  ODP_ERR("fatal we have no more elephants");  <--- an error log
 return (failed)
}


   odp_trace("exit  %s", __FUNC__);  <--- a trace
}


On 8 May 2014 06:34, Bill Fischofer <bill.fischofer@linaro.org> wrote:

> Since ODP is a framework and real-world applications that use it will
> undoubtedly have their own error-reporting and logging schemes, ODP itself
> should avoid reporting runtime error conditions via any means other than
> standard return codes to callers unless there are specific debug flags
> present for debugging ODP itself.
>
> So I'd say both of these should be under ODP_DEBUG_PRINT control.
>
> Bill
>
>
> On Thu, May 8, 2014 at 5:17 AM, Ciprian Barbu <ciprian.barbu@linaro.org>wrote:
>
>>
>>
>>
>> On Wed, May 7, 2014 at 6:27 PM, Mike Holmes <mike.holmes@linaro.org>wrote:
>>
>>> we have two printing functions ODP_DBG and ODP_ERR
>>>
>>> /**
>>>  * Debug printing macro, which prints output when DEBUG flag is set.
>>>  */
>>> #define ODP_DBG(fmt, ...) \
>>>  do { if (ODP_DEBUG == 1) printf(fmt, ##__VA_ARGS__); } while (0)
>>>
>>> I think this should be enabled with ODP_DEBUG_PRINT to allow other debug
>>> capabilities to be independently enabled - as with the "-O0 -g". To my mind
>>> ODP_TRACE implies that enables trace points in the code and is not as good
>>> a name.
>>>
>>
>> Why is a trace different from a debug message?
>> http://en.wikipedia.org/wiki/Tracing_(software)
>>
>>>
>>>
>>> Then we have ODP_ERR  should this be enabled by ODP_DEBUG_PRINT as well
>>> ? Presumably ODP_ERR is always active, but could be defined as a NOP if it
>>> is not redirected to another logging mechanism by any given implementation.
>>> Or do we consider the information it provides a critical part of the API
>>> that apps can depend on ?
>>> /**
>>>  * Print output to stderr (file, line and function).
>>>  */
>>> #define ODP_ERR(fmt, ...) \
>>>  fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
>>> __LINE__, __func__, ##__VA_ARGS__)
>>>
>>
>> On certain platforms you might not have any kind of error message storing
>> (not even stdout) so I would say it's platform dependent. On linux-generic
>> ODP_ERR could be level 1 of tracing, where the trace level would be set by
>> default to 1, but could be configurable to 0 if wanted. Something like
>> ODP_DEBUG_PRINT_LEVEL=1 by default and ODP_ERR=1, ODP_DBG=2.
>>
>>
>>>
>>> I will capture the rationale for these in the arch doc when we decide.
>>>
>>>
>>> On 7 May 2014 07:12, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
>>>
>>>> On 05/07/2014 12:48 PM, Anders Roxell wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 7 May 2014 09:29, Ciprian Barbu <ciprian.barbu@linaro.org <mailto:
>>>>> ciprian.barbu@linaro.org>> wrote:
>>>>>
>>>>>     HI,
>>>>>
>>>>>
>>>>>     On Tue, May 6, 2014 at 11:59 PM, Anders Roxell
>>>>>     <anders.roxell@linaro.org <mailto:anders.roxell@linaro.org>>
>>>>> wrote:
>>>>>
>>>>>         Signed-off-by: Anders Roxell <anders.roxell@linaro.org
>>>>>         <mailto:anders.roxell@linaro.org>>
>>>>>
>>>>>         ---
>>>>>          Makefile.inc | 4 ++++
>>>>>          1 file changed, 4 insertions(+)
>>>>>
>>>>>         diff --git a/Makefile.inc b/Makefile.inc
>>>>>         index 6b292ce..fba4d45 100644
>>>>>         --- a/Makefile.inc
>>>>>         +++ b/Makefile.inc
>>>>>         @@ -17,7 +17,11 @@ RMDIR  := rm -rf
>>>>>          RM     := rm -f
>>>>>          COPY   := cp -r
>>>>>
>>>>>         +ifeq ($(ODP_DEBUG),no)
>>>>>         +EXTRA_CFLAGS += -DODP_DEBUG=0
>>>>>         +else
>>>>>          EXTRA_CFLAGS += -DODP_DEBUG=1
>>>>>         +endif
>>>>>
>>>>>
>>>>>     I think we should consider changing the name of ODP_DEBUG to
>>>>>     reflect that they are log traces, it's confusing having two
>>>>>     Makefile variables called *DEBUG. I remember we talked about
>>>>>     introducing a multi-level trace mechanism in odp, so maybe we
>>>>>     should try doing that for a change.
>>>>>
>>>>>
>>>>> I agree... maybe call it ODP_TRACE?
>>>>>
>>>>
>>>> How about ODP_DEBUG_PRINT ?
>>>>
>>>>>
>>>>>
>>>>>          ifeq ($(DEBUG),yes)
>>>>>          EXTRA_CFLAGS += -O0 -g
>>>>>         --
>>>>>         1.9.1
>>>>>
>>>>>
>>>>>         _______________________________________________
>>>>>         lng-odp mailing list
>>>>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>>
>>>>>
>>>>>     /Ciprian
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> lng-odp mailing list
>>>>> lng-odp@lists.linaro.org
>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> lng-odp mailing list
>>>> lng-odp@lists.linaro.org
>>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>
>>>
>>>
>>>
>>> --
>>> *Mike Holmes*
>>> Linaro Technical Manager / Lead
>>> LNG - ODP
>>>
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>
diff mbox

Patch

diff --git a/Makefile.inc b/Makefile.inc
index 6b292ce..fba4d45 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -17,7 +17,11 @@  RMDIR  := rm -rf
 RM     := rm -f
 COPY   := cp -r
 
+ifeq ($(ODP_DEBUG),no)
+EXTRA_CFLAGS += -DODP_DEBUG=0
+else
 EXTRA_CFLAGS += -DODP_DEBUG=1
+endif
 
 ifeq ($(DEBUG),yes)
 EXTRA_CFLAGS += -O0 -g