From patchwork Fri Sep 17 21:58:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 189082 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8HLwZsV030935 for ; Fri, 17 Sep 2010 21:58:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882Ab0IQV6d (ORCPT ); Fri, 17 Sep 2010 17:58:33 -0400 Received: from cantor.suse.de ([195.135.220.2]:45681 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844Ab0IQV6c (ORCPT ); Fri, 17 Sep 2010 17:58:32 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 710C090975; Fri, 17 Sep 2010 23:58:31 +0200 (CEST) From: Thomas Renninger To: Jean Pihet Subject: Re: [PATCH] tracing, perf: add more power related events Date: Fri, 17 Sep 2010 23:58:17 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34.4-0.1.99.9.f8e4270-desktop; KDE/4.4.4; x86_64; ; ) Cc: Ingo Molnar , Arjan van de Ven , Peter Zijlstra , Len Brown , arjan@infradead.org, Kevin Hilman , linux-kernel@vger.kernel.org, discuss@lesswatts.org, linux-pm@lists.linux-foundation.org, linux-omap@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-trace-users@vger.kernel.org References: <201009171508.46471.trenn@suse.de> In-Reply-To: MIME-Version: 1.0 Message-Id: <201009172358.18652.trenn@suse.de> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 17 Sep 2010 21:58:35 +0000 (UTC) Index: linux-2.6.35-master/drivers/cpufreq/cpufreq.c =================================================================== --- linux-2.6.35-master.orig/drivers/cpufreq/cpufreq.c +++ linux-2.6.35-master/drivers/cpufreq/cpufreq.c @@ -354,6 +354,7 @@ void cpufreq_notify_transition(struct cp adjust_jiffies(CPUFREQ_POSTCHANGE, freqs); dprintk("FREQ: %lu - CPU: %lu", (unsigned long)freqs->new, (unsigned long)freqs->cpu); + trace_power_switch_state(POWER_PSTATE, freqs->new, freqs->cpu); trace_power_frequency(POWER_PSTATE, freqs->new, freqs->cpu); srcu_notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_POSTCHANGE, freqs); Index: linux-2.6.35-master/include/trace/events/power.h =================================================================== --- linux-2.6.35-master.orig/include/trace/events/power.h +++ linux-2.6.35-master/include/trace/events/power.h @@ -38,6 +38,13 @@ DECLARE_EVENT_CLASS(power, (unsigned long)__entry->state, (unsigned long)__entry->cpu_id) ); +DEFINE_EVENT(power, power_switch_state, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + + TP_ARGS(type, state, cpu_id) +); + DEFINE_EVENT(power, power_start, TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), Index: linux-2.6.35-master/kernel/trace/power-traces.c =================================================================== --- linux-2.6.35-master.orig/kernel/trace/power-traces.c +++ linux-2.6.35-master/kernel/trace/power-traces.c @@ -13,5 +13,4 @@ #define CREATE_TRACE_POINTS #include -EXPORT_TRACEPOINT_SYMBOL_GPL(power_frequency);