* [Powertop] [PATCH] Enable asserts and make correct comment
@ 2012-10-11 10:58 Igor Zhbanov
0 siblings, 0 replies; 6+ messages in thread
From: Igor Zhbanov @ 2012-10-11 10:58 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]
Enable asserts for test period and correct the comments.
It is better to know why a crash happen when it could happen
than just silently die.
---
src/report/report-formatter-base.cpp | 3 ++-
src/report/report-formatter-csv.cpp | 3 ++-
src/report/report-formatter-html.cpp | 3 ++-
src/report/report-maker.cpp | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/report/report-formatter-base.cpp b/src/report/report-formatter-base.cpp
index 4b448be..e0dc49c 100644
--- a/src/report/report-formatter-base.cpp
+++ b/src/report/report-formatter-base.cpp
@@ -25,7 +25,8 @@
#define _BSD_SOURCE
-#define NDEBUG /* Enable asserts */
+/* Uncomment to disable asserts */
+/*#define NDEBUG*/
#include <stdio.h>
#include <assert.h>
diff --git a/src/report/report-formatter-csv.cpp b/src/report/report-formatter-csv.cpp
index 9b154b5..cd70d91 100644
--- a/src/report/report-formatter-csv.cpp
+++ b/src/report/report-formatter-csv.cpp
@@ -25,7 +25,8 @@
#define _BSD_SOURCE
-#define NDEBUG /* Enable asserts */
+/* Uncomment to disable asserts */
+/*#define NDEBUG*/
#include <stdio.h>
#include <assert.h>
diff --git a/src/report/report-formatter-html.cpp b/src/report/report-formatter-html.cpp
index 56f9648..5851575 100644
--- a/src/report/report-formatter-html.cpp
+++ b/src/report/report-formatter-html.cpp
@@ -25,7 +25,8 @@
#define _BSD_SOURCE
-#define NDEBUG /* Enable asserts */
+/* Uncomment to disable asserts */
+/*#define NDEBUG*/
#include <stdio.h>
#include <assert.h>
diff --git a/src/report/report-maker.cpp b/src/report/report-maker.cpp
index 4a68a8c..c00c955 100644
--- a/src/report/report-maker.cpp
+++ b/src/report/report-maker.cpp
@@ -23,7 +23,8 @@
* Written by Igor Zhbanov <i.zhbanov(a)samsung.com>
* 2012.10 */
-#define NDEBUG /* Enable asserts */
+/* Uncomment to disable asserts */
+/*#define NDEBUG*/
#include <assert.h>
#include <stdarg.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Enable asserts and make correct comment
@ 2012-10-17 15:10 Igor Zhbanov
0 siblings, 0 replies; 6+ messages in thread
From: Igor Zhbanov @ 2012-10-17 15:10 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2514 bytes --]
Hi all.
Any comments? ;-)
This patch fixes the comments and enables the asserts.
Igor Zhbanov wrote:
> Enable asserts for test period and correct the comments.
> It is better to know why a crash happen when it could happen
> than just silently die.
> ---
> src/report/report-formatter-base.cpp | 3 ++-
> src/report/report-formatter-csv.cpp | 3 ++-
> src/report/report-formatter-html.cpp | 3 ++-
> src/report/report-maker.cpp | 3 ++-
> 4 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/src/report/report-formatter-base.cpp b/src/report/report-formatter-base.cpp
> index 4b448be..e0dc49c 100644
> --- a/src/report/report-formatter-base.cpp
> +++ b/src/report/report-formatter-base.cpp
> @@ -25,7 +25,8 @@
>
> #define _BSD_SOURCE
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <stdio.h>
> #include <assert.h>
> diff --git a/src/report/report-formatter-csv.cpp b/src/report/report-formatter-csv.cpp
> index 9b154b5..cd70d91 100644
> --- a/src/report/report-formatter-csv.cpp
> +++ b/src/report/report-formatter-csv.cpp
> @@ -25,7 +25,8 @@
>
> #define _BSD_SOURCE
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <stdio.h>
> #include <assert.h>
> diff --git a/src/report/report-formatter-html.cpp b/src/report/report-formatter-html.cpp
> index 56f9648..5851575 100644
> --- a/src/report/report-formatter-html.cpp
> +++ b/src/report/report-formatter-html.cpp
> @@ -25,7 +25,8 @@
>
> #define _BSD_SOURCE
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <stdio.h>
> #include <assert.h>
> diff --git a/src/report/report-maker.cpp b/src/report/report-maker.cpp
> index 4a68a8c..c00c955 100644
> --- a/src/report/report-maker.cpp
> +++ b/src/report/report-maker.cpp
> @@ -23,7 +23,8 @@
> * Written by Igor Zhbanov <i.zhbanov(a)samsung.com>
> * 2012.10 */
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <assert.h>
> #include <stdarg.h>
--
Best regards,
Igor Zhbanov,
Technical Leader,
phone: +7 (495) 797 25 00 ext 3806
e-mail: i.zhbanov(a)samsung.com
ASWG, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Enable asserts and make correct comment
@ 2012-10-17 15:17 Sergey Senozhatsky
0 siblings, 0 replies; 6+ messages in thread
From: Sergey Senozhatsky @ 2012-10-17 15:17 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2952 bytes --]
On (10/17/12 19:10), Igor Zhbanov wrote:
> Hi all.
>
> Any comments? ;-)
> This patch fixes the comments and enables the asserts.
>
Hello,
sorry, I thought it was merged. I don't have any objections for testing period.
can we make global flag somewhere and inverse the flag logic: `define DEBUG' instead of `define NO_DEBUG'?
-ss
> Igor Zhbanov wrote:
> >Enable asserts for test period and correct the comments.
> >It is better to know why a crash happen when it could happen
> >than just silently die.
> >---
> > src/report/report-formatter-base.cpp | 3 ++-
> > src/report/report-formatter-csv.cpp | 3 ++-
> > src/report/report-formatter-html.cpp | 3 ++-
> > src/report/report-maker.cpp | 3 ++-
> > 4 files changed, 8 insertions(+), 4 deletions(-)
> >
> >diff --git a/src/report/report-formatter-base.cpp b/src/report/report-formatter-base.cpp
> >index 4b448be..e0dc49c 100644
> >--- a/src/report/report-formatter-base.cpp
> >+++ b/src/report/report-formatter-base.cpp
> >@@ -25,7 +25,8 @@
> > #define _BSD_SOURCE
> >-#define NDEBUG /* Enable asserts */
> >+/* Uncomment to disable asserts */
> >+/*#define NDEBUG*/
> > #include <stdio.h>
> > #include <assert.h>
> >diff --git a/src/report/report-formatter-csv.cpp b/src/report/report-formatter-csv.cpp
> >index 9b154b5..cd70d91 100644
> >--- a/src/report/report-formatter-csv.cpp
> >+++ b/src/report/report-formatter-csv.cpp
> >@@ -25,7 +25,8 @@
> > #define _BSD_SOURCE
> >-#define NDEBUG /* Enable asserts */
> >+/* Uncomment to disable asserts */
> >+/*#define NDEBUG*/
> > #include <stdio.h>
> > #include <assert.h>
> >diff --git a/src/report/report-formatter-html.cpp b/src/report/report-formatter-html.cpp
> >index 56f9648..5851575 100644
> >--- a/src/report/report-formatter-html.cpp
> >+++ b/src/report/report-formatter-html.cpp
> >@@ -25,7 +25,8 @@
> > #define _BSD_SOURCE
> >-#define NDEBUG /* Enable asserts */
> >+/* Uncomment to disable asserts */
> >+/*#define NDEBUG*/
> > #include <stdio.h>
> > #include <assert.h>
> >diff --git a/src/report/report-maker.cpp b/src/report/report-maker.cpp
> >index 4a68a8c..c00c955 100644
> >--- a/src/report/report-maker.cpp
> >+++ b/src/report/report-maker.cpp
> >@@ -23,7 +23,8 @@
> > * Written by Igor Zhbanov <i.zhbanov(a)samsung.com>
> > * 2012.10 */
> >-#define NDEBUG /* Enable asserts */
> >+/* Uncomment to disable asserts */
> >+/*#define NDEBUG*/
> > #include <assert.h>
> > #include <stdarg.h>
>
> --
> Best regards,
> Igor Zhbanov,
> Technical Leader,
> phone: +7 (495) 797 25 00 ext 3806
> e-mail: i.zhbanov(a)samsung.com
>
> ASWG, Moscow R&D center, Samsung Electronics
> 12 Dvintsev street, building 1
> 127018, Moscow, Russian Federation
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Enable asserts and make correct comment
@ 2012-10-17 15:21 Arjan van de Ven
0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2012-10-17 15:21 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
On 10/17/2012 8:17 AM, Sergey Senozhatsky wrote:
> On (10/17/12 19:10), Igor Zhbanov wrote:
>> Hi all.
>>
>> Any comments? ;-)
>> This patch fixes the comments and enables the asserts.
>>
>
> Hello,
> sorry, I thought it was merged. I don't have any objections for testing period.
>
> can we make global flag somewhere and inverse the flag logic: `define DEBUG' instead of `define NO_DEBUG'?
nah
asserts should just always be on
no excuse not to.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Enable asserts and make correct comment
@ 2012-10-18 8:06 Igor Zhbanov
0 siblings, 0 replies; 6+ messages in thread
From: Igor Zhbanov @ 2012-10-18 8:06 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
Arjan van de Ven wrote:
> On 10/17/2012 8:17 AM, Sergey Senozhatsky wrote:
>> On (10/17/12 19:10), Igor Zhbanov wrote:
>>> Hi all.
>>>
>>> Any comments? ;-)
>>> This patch fixes the comments and enables the asserts.
>>>
>> Hello,
>> sorry, I thought it was merged. I don't have any objections for testing period.
>>
>> can we make global flag somewhere and inverse the flag logic: `define DEBUG' instead of `define NO_DEBUG'?
> nah
>
> asserts should just always be on
> no excuse not to.
Just a notice.
The patch that enables asserts still not merged. ;-)
--
Best regards,
Igor Zhbanov,
Technical Leader,
phone: +7 (495) 797 25 00 ext 3806
e-mail: i.zhbanov(a)samsung.com
ASWG, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Enable asserts and make correct comment
@ 2012-10-24 17:37 Chris Ferron
0 siblings, 0 replies; 6+ messages in thread
From: Chris Ferron @ 2012-10-24 17:37 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]
On 10/11/2012 03:58 AM, Igor Zhbanov wrote:
> Enable asserts for test period and correct the comments.
> It is better to know why a crash happen when it could happen
> than just silently die.
> ---
> src/report/report-formatter-base.cpp | 3 ++-
> src/report/report-formatter-csv.cpp | 3 ++-
> src/report/report-formatter-html.cpp | 3 ++-
> src/report/report-maker.cpp | 3 ++-
> 4 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/src/report/report-formatter-base.cpp b/src/report/report-formatter-base.cpp
> index 4b448be..e0dc49c 100644
> --- a/src/report/report-formatter-base.cpp
> +++ b/src/report/report-formatter-base.cpp
> @@ -25,7 +25,8 @@
>
> #define _BSD_SOURCE
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <stdio.h>
> #include <assert.h>
> diff --git a/src/report/report-formatter-csv.cpp b/src/report/report-formatter-csv.cpp
> index 9b154b5..cd70d91 100644
> --- a/src/report/report-formatter-csv.cpp
> +++ b/src/report/report-formatter-csv.cpp
> @@ -25,7 +25,8 @@
>
> #define _BSD_SOURCE
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <stdio.h>
> #include <assert.h>
> diff --git a/src/report/report-formatter-html.cpp b/src/report/report-formatter-html.cpp
> index 56f9648..5851575 100644
> --- a/src/report/report-formatter-html.cpp
> +++ b/src/report/report-formatter-html.cpp
> @@ -25,7 +25,8 @@
>
> #define _BSD_SOURCE
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <stdio.h>
> #include <assert.h>
> diff --git a/src/report/report-maker.cpp b/src/report/report-maker.cpp
> index 4a68a8c..c00c955 100644
> --- a/src/report/report-maker.cpp
> +++ b/src/report/report-maker.cpp
> @@ -23,7 +23,8 @@
> * Written by Igor Zhbanov <i.zhbanov(a)samsung.com>
> * 2012.10 */
>
> -#define NDEBUG /* Enable asserts */
> +/* Uncomment to disable asserts */
> +/*#define NDEBUG*/
>
> #include <assert.h>
> #include <stdarg.h>
Your patch as been merged.
Thank You
-C
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-24 17:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 15:10 [Powertop] [PATCH] Enable asserts and make correct comment Igor Zhbanov
-- strict thread matches above, loose matches on Subject: below --
2012-10-24 17:37 Chris Ferron
2012-10-18 8:06 Igor Zhbanov
2012-10-17 15:21 Arjan van de Ven
2012-10-17 15:17 Sergey Senozhatsky
2012-10-11 10:58 Igor Zhbanov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.