From: Punit Agrawal <punit.agrawal@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Javi Merino <Javi.Merino@arm.com>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [RFC PATCH 3/3] thermal: trace: Trace when temperature is above a trip point
Date: Thu, 12 Jun 2014 17:16:34 +0100 [thread overview]
Message-ID: <9hh61k66r31.fsf@arm.com> (raw)
In-Reply-To: <20140611110824.7aa2adc2@gandalf.local.home> (Steven Rostedt's message of "Wed, 11 Jun 2014 11:08:24 -0400")
Steven Rostedt <rostedt@goodmis.org> writes:
[...]
>>
>> # pwd /sys/kernel/debug/tracing/events/thermal/thermal_zone_trip
>> # cat format
>> name: thermal_zone_trip
>> ID: 463
>> format:
>> field:unsigned short common_type; offset:0; size:2; signed:0;
>> field:unsigned char common_flags; offset:2; size:1; signed:0;
>> field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
>> field:int common_pid; offset:4; size:4; signed:1;
>>
>> field:__data_loc char[] thermal_zone; offset:8; size:4; signed:0;
>> field:int id; offset:12; size:4; signed:1;
>> field:int trip; offset:16; size:4; signed:1;
>> field:enum thermal_trip_type trip_type; offset:20; size:4; signed:0;
>>
>> print fmt: "thermal_zone=%s id=%d trip=%d trip_type=%s",
>> __get_str(thermal_zone), REC->id, REC->trip,
>> __print_symbolic(REC->trip_type, { THERMAL_TRIP_ACTIVE, "active" },
>> { THERMAL_TRIP_PASSIVE, "passive" }, { THERMAL_TRIP_HOT, "hot" }, {
>> THERMAL_TRIP_CRITICAL, "critical" })
>>
>
> For it to work with trace-cmd (and perf) you'll need to add a plugin to
> define what those enums are. This is the file that trace-cmd uses to
> foramat. But it has no idea how to convert something like
> THERMAL_TRIP_PASSIVE into a number.
>
Hmm, right. I was working under the assumption that the enum values will
be converted to their numeric representation when compiled.
I think it's better to convert the enum to int in the trace event - the
changes are localised and the tool will work as well.
Rui, Eduardo what do you think?
Punit
> -- Steve
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Punit Agrawal <punit.agrawal@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "linux-pm\@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Javi Merino <Javi.Merino@arm.com>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [RFC PATCH 3/3] thermal: trace: Trace when temperature is above a trip point
Date: Thu, 12 Jun 2014 17:16:34 +0100 [thread overview]
Message-ID: <9hh61k66r31.fsf@arm.com> (raw)
In-Reply-To: <20140611110824.7aa2adc2@gandalf.local.home> (Steven Rostedt's message of "Wed, 11 Jun 2014 11:08:24 -0400")
Steven Rostedt <rostedt@goodmis.org> writes:
[...]
>>
>> # pwd /sys/kernel/debug/tracing/events/thermal/thermal_zone_trip
>> # cat format
>> name: thermal_zone_trip
>> ID: 463
>> format:
>> field:unsigned short common_type; offset:0; size:2; signed:0;
>> field:unsigned char common_flags; offset:2; size:1; signed:0;
>> field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
>> field:int common_pid; offset:4; size:4; signed:1;
>>
>> field:__data_loc char[] thermal_zone; offset:8; size:4; signed:0;
>> field:int id; offset:12; size:4; signed:1;
>> field:int trip; offset:16; size:4; signed:1;
>> field:enum thermal_trip_type trip_type; offset:20; size:4; signed:0;
>>
>> print fmt: "thermal_zone=%s id=%d trip=%d trip_type=%s",
>> __get_str(thermal_zone), REC->id, REC->trip,
>> __print_symbolic(REC->trip_type, { THERMAL_TRIP_ACTIVE, "active" },
>> { THERMAL_TRIP_PASSIVE, "passive" }, { THERMAL_TRIP_HOT, "hot" }, {
>> THERMAL_TRIP_CRITICAL, "critical" })
>>
>
> For it to work with trace-cmd (and perf) you'll need to add a plugin to
> define what those enums are. This is the file that trace-cmd uses to
> foramat. But it has no idea how to convert something like
> THERMAL_TRIP_PASSIVE into a number.
>
Hmm, right. I was working under the assumption that the enum values will
be converted to their numeric representation when compiled.
I think it's better to convert the enum to int in the trace event - the
changes are localised and the tool will work as well.
Rui, Eduardo what do you think?
Punit
> -- Steve
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-06-12 16:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 11:31 [RFC PATCH 0/3] Add trace to thermal framework Punit Agrawal
2014-06-11 11:31 ` [RFC PATCH 1/3] thermal: trace: Trace temperature changes Punit Agrawal
2014-06-11 11:31 ` [RFC PATCH 2/3] thermal: trace: Trace when a cooling device's state is updated Punit Agrawal
2014-06-11 11:31 ` [RFC PATCH 3/3] thermal: trace: Trace when temperature is above a trip point Punit Agrawal
2014-06-11 12:49 ` Steven Rostedt
2014-06-11 14:11 ` Punit Agrawal
2014-06-11 14:11 ` Punit Agrawal
2014-06-11 14:20 ` Steven Rostedt
2014-06-11 14:20 ` Steven Rostedt
2014-06-11 14:53 ` Punit Agrawal
2014-06-11 14:53 ` Punit Agrawal
2014-06-11 15:08 ` Steven Rostedt
2014-06-11 15:08 ` Steven Rostedt
2014-06-12 16:16 ` Punit Agrawal [this message]
2014-06-12 16:16 ` Punit Agrawal
2014-06-20 17:24 ` Javi Merino
2014-06-24 10:41 ` Punit Agrawal
2014-06-24 10:41 ` Punit Agrawal
2014-06-25 13:26 ` Javi Merino
2014-07-25 14:11 ` edubezval
2014-07-29 10:50 ` [PATCH 0/3] Add trace to thermal framework Punit Agrawal
2014-07-29 10:50 ` [PATCH 1/3] thermal: trace: Trace temperature changes Punit Agrawal
2014-07-29 10:50 ` [PATCH 2/3] thermal: trace: Trace when a cooling device's state is updated Punit Agrawal
2014-07-29 10:50 ` [PATCH 3/3] thermal: trace: Trace when temperature is above a trip point Punit Agrawal
2014-07-29 13:33 ` [PATCH 0/3] Add trace to thermal framework Eduardo Valentin
2014-07-30 11:40 ` Punit Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9hh61k66r31.fsf@arm.com \
--to=punit.agrawal@arm.com \
--cc=Javi.Merino@arm.com \
--cc=edubezval@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.