* [Powertop] Wrong common field name in GFX Wakeups event
@ 2012-07-11 6:15 Igor Zhbanov
0 siblings, 0 replies; 3+ messages in thread
From: Igor Zhbanov @ 2012-07-11 6:15 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]
Hello!
I have found that PowerTOP doesn't displays values in "GFX Wakeups/s" column.
It is because of wrong event field name the handle_trace_point() method
expects to find in a trace event.
Here is the patch:
--8<--Cut-here----------------------------------------------------------------
diff -purN powertop/src/process/do_process.cpp powertop-new/src/process/do_process.cpp
--- powertop/src/process/do_process.cpp 2012-07-05 13:06:16.080258858 +0400
+++ powertop-new/src/process/do_process.cpp 2012-07-06 13:31:14.382651388 +0400
@@ -340,7 +340,7 @@ void perf_process_bundle::handle_trace_p
int flags;
int pid;
- ret = pevent_get_common_field_val(NULL, event, "flags",&rec,&val, 0);
+ ret = pevent_get_common_field_val(NULL, event, "common_flags",&rec,&val, 0);
if (ret< 0)
return;
flags = (int)val;
@@ -625,7 +625,7 @@ void perf_process_bundle::handle_trace_p
class power_consumer *consumer = NULL;
int flags;
- ret = pevent_get_common_field_val(NULL, event, "flags",&rec,&val, 0);
+ ret = pevent_get_common_field_val(NULL, event, "common_flags",&rec,&val, 0);
if (ret< 0)
return;
flags = (int)val;
--8<--------------------------------------------------------------------------
Thank you.
--
Best regards,
Igor Zhbanov,
Expert Software Engineer,
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 05-powertop-fix03.diff --]
[-- Type: text/x-diff, Size: 863 bytes --]
diff -purN powertop/src/process/do_process.cpp powertop-new/src/process/do_process.cpp
--- powertop/src/process/do_process.cpp 2012-07-05 13:06:16.080258858 +0400
+++ powertop-new/src/process/do_process.cpp 2012-07-06 13:31:14.382651388 +0400
@@ -340,7 +340,7 @@ void perf_process_bundle::handle_trace_p
int flags;
int pid;
- ret = pevent_get_common_field_val(NULL, event, "flags", &rec, &val, 0);
+ ret = pevent_get_common_field_val(NULL, event, "common_flags", &rec, &val, 0);
if (ret < 0)
return;
flags = (int)val;
@@ -625,7 +625,7 @@ void perf_process_bundle::handle_trace_p
class power_consumer *consumer = NULL;
int flags;
- ret = pevent_get_common_field_val(NULL, event, "flags", &rec, &val, 0);
+ ret = pevent_get_common_field_val(NULL, event, "common_flags", &rec, &val, 0);
if (ret < 0)
return;
flags = (int)val;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Powertop] Wrong common field name in GFX Wakeups event
@ 2012-07-11 8:33 Igor Zhbanov
0 siblings, 0 replies; 3+ messages in thread
From: Igor Zhbanov @ 2012-07-11 8:33 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3188 bytes --]
Here is formatted version of the patch:
From 23362fa0f7bbfd0497a8ccbb9d06a4520eae8057 Mon Sep 17 00:00:00 2001
From: Igor Zhbanov<i.zhbanov(a)samsung.com>
Date: Wed, 11 Jul 2012 12:30:27 +0400
Subject: [PATCH] Wrong common field name in GFX Wakeups event
I have found that PowerTOP doesn't displays values in "GFX Wakeups/s" column.
It is because of wrong event field name the handle_trace_point() method
expects to find in a trace event.
---
src/process/do_process.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/process/do_process.cpp b/src/process/do_process.cpp
index b7006ee..731fe3e 100644
--- a/src/process/do_process.cpp
+++ b/src/process/do_process.cpp
@@ -312,7 +312,7 @@ void perf_process_bundle::handle_trace_point(void *trace, int cpu, uint64_t time
int flags;
int pid;
- ret = pevent_get_common_field_val(NULL, event, "flags",&rec,&val, 0);
+ ret = pevent_get_common_field_val(NULL, event, "common_flags",&rec,&val, 0);
if (ret< 0)
return;
flags = (int)val;
@@ -597,7 +597,7 @@ void perf_process_bundle::handle_trace_point(void *trace, int cpu, uint64_t time
class power_consumer *consumer = NULL;
int flags;
- ret = pevent_get_common_field_val(NULL, event, "flags",&rec,&val, 0);
+ ret = pevent_get_common_field_val(NULL, event, "common_flags",&rec,&val, 0);
if (ret< 0)
return;
flags = (int)val;
--
1.7.5.4
Igor Zhbanov wrote:
> Hello!
>
> I have found that PowerTOP doesn't displays values in "GFX Wakeups/s"
> column.
> It is because of wrong event field name the handle_trace_point() method
> expects to find in a trace event.
>
> Here is the patch:
> --8<--Cut-here----------------------------------------------------------------
>
> diff -purN powertop/src/process/do_process.cpp
> powertop-new/src/process/do_process.cpp
> --- powertop/src/process/do_process.cpp 2012-07-05
> 13:06:16.080258858 +0400
> +++ powertop-new/src/process/do_process.cpp 2012-07-06
> 13:31:14.382651388 +0400
> @@ -340,7 +340,7 @@ void perf_process_bundle::handle_trace_p
> int flags;
> int pid;
>
> - ret = pevent_get_common_field_val(NULL, event,
> "flags",&rec,&val, 0);
> + ret = pevent_get_common_field_val(NULL, event,
> "common_flags",&rec,&val, 0);
> if (ret< 0)
> return;
> flags = (int)val;
> @@ -625,7 +625,7 @@ void perf_process_bundle::handle_trace_p
> class power_consumer *consumer = NULL;
> int flags;
>
> - ret = pevent_get_common_field_val(NULL, event,
> "flags",&rec,&val, 0);
> + ret = pevent_get_common_field_val(NULL, event,
> "common_flags",&rec,&val, 0);
> if (ret< 0)
> return;
> flags = (int)val;
> --8<--------------------------------------------------------------------------
>
>
> Thank you.
--
Best regards,
Igor Zhbanov,
Expert Software Engineer,
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 related [flat|nested] 3+ messages in thread
* Re: [Powertop] Wrong common field name in GFX Wakeups event
@ 2012-07-17 22:10 Chris Ferron
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ferron @ 2012-07-17 22:10 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
On 07/10/2012 11:15 PM, Igor Zhbanov wrote:
> Hello!
>
> I have found that PowerTOP doesn't displays values in "GFX Wakeups/s"
> column.
> It is because of wrong event field name the handle_trace_point() method
> expects to find in a trace event.
>
> Here is the patch:
> --8<--Cut-here----------------------------------------------------------------
>
> diff -purN powertop/src/process/do_process.cpp
> powertop-new/src/process/do_process.cpp
> --- powertop/src/process/do_process.cpp 2012-07-05
> 13:06:16.080258858 +0400
> +++ powertop-new/src/process/do_process.cpp 2012-07-06
> 13:31:14.382651388 +0400
> @@ -340,7 +340,7 @@ void perf_process_bundle::handle_trace_p
> int flags;
> int pid;
>
> - ret = pevent_get_common_field_val(NULL, event,
> "flags",&rec,&val, 0);
> + ret = pevent_get_common_field_val(NULL, event,
> "common_flags",&rec,&val, 0);
> if (ret< 0)
> return;
> flags = (int)val;
> @@ -625,7 +625,7 @@ void perf_process_bundle::handle_trace_p
> class power_consumer *consumer = NULL;
> int flags;
>
> - ret = pevent_get_common_field_val(NULL, event,
> "flags",&rec,&val, 0);
> + ret = pevent_get_common_field_val(NULL, event,
> "common_flags",&rec,&val, 0);
> if (ret< 0)
> return;
> flags = (int)val;
> --8<--------------------------------------------------------------------------
>
>
> Thank you.
>
>
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
Your patch has been merged.
Thank you,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-17 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17 22:10 [Powertop] Wrong common field name in GFX Wakeups event Chris Ferron
-- strict thread matches above, loose matches on Subject: below --
2012-07-11 8:33 Igor Zhbanov
2012-07-11 6:15 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.