[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9hh61k66r31.fsf@arm.com>
Date: Thu, 12 Jun 2014 17:16:34 +0100
From: Punit Agrawal <punit.agrawal@....com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: "linux-pm\@vger.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
Javi Merino <Javi.Merino@....com>,
Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [RFC PATCH 3/3] thermal: trace: Trace when temperature is above a trip point
Steven Rostedt <rostedt@...dmis.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@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists