linux/drivers/cpufreq/cpufreq_stats.c
<<
>>
Prefs
   1/*
   2 *  drivers/cpufreq/cpufreq_stats.c
   3 *
   4 *  Copyright (C) 2003-2004 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>.
   5 *            (C) 2004 Zou Nan hai <nanhai.zou@intel.com>.
   6 *
   7 * This program is free software; you can redistribute it and/or modify
   8 * it under the terms of the GNU General Public License version 2 as
   9 * published by the Free Software Foundation.
  10 */
  11
  12#include <linux/kernel.h>
  13#include <linux/sysdev.h>
  14#include <linux/cpu.h>
  15#include <linux/sysfs.h>
  16#include <linux/cpufreq.h>
  17#include <linux/jiffies.h>
  18#include <linux/percpu.h>
  19#include <linux/kobject.h>
  20#include <linux/spinlock.h>
  21#include <linux/notifier.h>
  22#include <asm/cputime.h>
  23
  24static spinlock_t cpufreq_stats_lock;
  25
  26#define CPUFREQ_STATDEVICE_ATTR(_name,_mode,_show) \
  27static struct freq_attr _attr_##_name = {\
  28        .attr = {.name = __stringify(_name), .mode = _mode, }, \
  29        .show = _show,\
  30};
  31
  32struct cpufreq_stats {
  33        unsigned int cpu;
  34        unsigned int total_trans;
  35        unsigned long long  last_time;
  36        unsigned int max_state;
  37        unsigned int state_num;
  38        unsigned int last_index;
  39        cputime64_t *time_in_state;
  40        unsigned int *freq_table;
  41#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
  42        unsigned int *trans_table;
  43#endif
  44};
  45
  46static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table);
  47
  48struct cpufreq_stats_attribute {
  49        struct attribute attr;
  50        ssize_t(*show) (struct cpufreq_stats *, char *);
  51};
  52
  53static int
  54cpufreq_stats_update (unsigned int cpu)
  55{
  56        struct cpufreq_stats *stat;
  57        unsigned long long cur_time;
  58
  59        cur_time = get_jiffies_64();
  60        spin_lock(&cpufreq_stats_lock);
  61        stat = per_cpu(cpufreq_stats_table, cpu);
  62        if (stat->time_in_state)
  63                stat->time_in_state[stat->last_index] =
  64                        cputime64_add(stat->time_in_state[stat->last_index],
  65                                      cputime_sub(cur_time, stat->last_time));
  66        stat->last_time = cur_time;
  67        spin_unlock(&cpufreq_stats_lock);
  68        return 0;
  69}
  70
  71static ssize_t
  72show_total_trans(struct cpufreq_policy *policy, char *buf)
  73{
  74        struct cpufreq_stats *stat = per_cpu(cpufreq_stats_table, policy->cpu);
  75        if (!stat)
  76                return 0;
  77        return sprintf(buf, "%d\n",
  78                        per_cpu(cpufreq_stats_table, stat->cpu)->total_trans);
  79}
  80
  81static ssize_t
  82show_time_in_state(struct cpufreq_policy *policy, char *buf)
  83{
  84        ssize_t len = 0;
  85        int i;
  86        struct cpufreq_stats *stat = per_cpu(cpufreq_stats_table, policy->cpu);
  87        if (!stat)
  88                return 0;
  89        cpufreq_stats_update(stat->cpu);
  90        for (i = 0; i < stat->state_num; i++) {
  91                len += sprintf(buf + len, "%u %llu\n", stat->freq_table[i],
  92                        (unsigned long long)cputime64_to_clock_t(stat->time_in_state[i]));
  93        }
  94        return len;
  95}
  96
  97#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
  98static ssize_t
  99show_trans_table(struct cpufreq_policy *policy, char *buf)
 100{
 101        ssize_t len = 0;
 102        int i, j;
 103
 104        struct cpufreq_stats *stat = per_cpu(cpufreq_stats_table, policy->cpu);
 105        if (!stat)
 106                return 0;
 107        cpufreq_stats_update(stat->cpu);
 108        len += snprintf(buf + len, PAGE_SIZE - len, "   From  :    To\n");
 109        len += snprintf(buf + len, PAGE_SIZE - len, "         : ");
 110        for (i = 0; i < stat->state_num; i++) {
 111                if (len >= PAGE_SIZE)
 112                        break;
 113                len += snprintf(buf + len, PAGE_SIZE - len, "%9u ",
 114                                stat->freq_table[i]);
 115        }
 116        if (len >= PAGE_SIZE)
 117                return PAGE_SIZE;
 118
 119        len += snprintf(buf + len, PAGE_SIZE - len, "\n");
 120
 121        for (i = 0; i < stat->state_num; i++) {
 122                if (len >= PAGE_SIZE)
 123                        break;
 124
 125                len += snprintf(buf + len, PAGE_SIZE - len, "%9u: ",
 126                                stat->freq_table[i]);
 127
 128                for (j = 0; j < stat->state_num; j++)   {
 129                        if (len >= PAGE_SIZE)
 130                                break;
 131                        len += snprintf(buf + len, PAGE_SIZE - len, "%9u ",
 132                                        stat->trans_table[i*stat->max_state+j]);
 133                }
 134                if (len >= PAGE_SIZE)
 135                        break;
 136                len += snprintf(buf + len, PAGE_SIZE - len, "\n");
 137        }
 138        if (len >= PAGE_SIZE)
 139                return PAGE_SIZE;
 140        return len;
 141}
 142CPUFREQ_STATDEVICE_ATTR(trans_table,0444,show_trans_table);
 143#endif
 144
 145CPUFREQ_STATDEVICE_ATTR(total_trans,0444,show_total_trans);
 146CPUFREQ_STATDEVICE_ATTR(time_in_state,0444,show_time_in_state);
 147
 148static struct attribute *default_attrs[] = {
 149        &_attr_total_trans.attr,
 150        &_attr_time_in_state.attr,
{
cpufreq_stats_attribute {
  51};
_attr_time_in_state.show_tame="L52">  52
1  53static int
cpufreq_stats_attribute {
cpu)
  55{
_groreers/cle" class="sref">trruct <_groretuss="line" nam">trruct <_groree="L128/a> *stat;
attris="sref">cpufreq_s attrief">_attr_time_in_state.cur_time;
PAGE_SIZE -="+coa href="+codef">_attr_time_in_state.defaultame="L58">  58
get1_jiffies_64();
cpufre1q_stats_lock);
cpu);
[[ 104        struct len >= 1time_in_state)
last_index] =
[last_index],
[ 121 >[j = 0; j  36    ="L121"> 121 >[len >= linuxx/sysfs.h>
  62            stat-><>[cpufreq_s> 10 href="+code=stat" ="sref">len >= cur_time;
[);
default>        return 0;
  69}
  70
per_c ide="+codf="+cf="+code=cpufreq_stats_update" class="sref">cpufreq_stats_update (unsigned int ssize_t
buf)
 104        struct cpufreq_stats *stat = per_cpu(cpufreq_st;  73{
show_trans_table(struct stat->show_transstatclass="sref">cpufreq_st;cpu);
cpufreq_stats_table, cpufreq_se" class="sref">cpufreq_stats_update (unsigned int linus="sref">stat)
cpufreq_stats_tableats_table" clas>(trruct <_groretuss="line" nam">trruct <_groree="Lt;state_num; stat<"L132"> 132                                    if (stat;default>total_trans);
stat<"L132"> 132            t;  79}
stat<"="Lt;);
cpufreq_stats_update (uns34<_stats_l//cpufeq_stats.c#L51"32"> 132   03pufreq/cpufreq_stats.c#L88" id="L88" 2olicye
uans_table(struct (buf)
<1a hre1="drivf="include/linux/cpufreq.h" class="fre"line" ns" class=>  84        cpufr">cpufreq1_stats_table,   99cpufr"puf struc_stats.c#L87" id="L87" c1lass=1line" name="L87">  87
cpufr"     if (a href="drivers/cpufreq/1cpufr1q_stat         return 0;
cpu1freq_stats_update(cputime64_t *cur_tid="L146" class="line"_table[(strounaef1">las146" class="line"rrans_table(streaef1">lasnclude/linux/cpufreq.h"t1aine" nameq_stats_lolass="sre1f">stat->  55{
  561 class="s1ref">stat->
  561 stats_l//t-> *  561 >(i]));
  561 s" class=_stats.c#L94" id="L94" c1lass=19req_st;cpufrcode=len"1 class="sref">len;
<1a hre19 name="L105"> 105       -6" class="line"EBUSYlicy" c_stats.cEBUSYfreq6" id="L56" class="line" name="L56">  561 >cpufreq1e" name="L95">  95}
1);
defzrlloca>);
[stat<"="Lt;stat<"="Lt;cpufrcpuf struc"L97">  97#ifdef   87    -6" class="line"ENOMEMlicy" c_stats.cENOMEMfreq6" id="L56" class="line" name="L56">  561      if (q_stats.c#L98" id="L98" 1class1"line"" id="L56" class="line" name="L56">  562ef">cpufr2q_policy *show_trans_table(struct stat->show_transbuf)
stat<"="Lt;2101        le6" class="line"rrans_table(streaef1">la-6" class="line"EINVAf">stat<"="Lt;  562lass="lin2" name="L102"> 102  2     20  03pufreq/cpufreq_stgotoe6" class="line"errorref">fail">stat<"="Lt;failfreq6" id="L56" class="line" name="L56">  562l4ss="lin2"ef">i]));
cpufreq_2tats_table, la (unsigned int linus="sref">statcpufreq_stats_tableats_i"freq_stats.c#L120" id="L120" class="f">cpuf2a>)
len >gotoe6" class="line"errorrouans_table(sterrorrouafreq6" id="L56" class="line" name="L56">  562l8)
  97#ifdef PAGE_SIZ2 - len,   562="sref">P2GE_SIZE - la (unsigned int   562ass="sref2>stat->  562a="L101">2     if (lenpufreq_stats.c#L120" id="L120" class="lin=st_index],
 126        tr_time_in_state/cpuuency126"> 126  /cpuuencys="sr!la (unsigned int w_total_TABLE_END126"> 126  w_total_TABLE_ENDc#L56ss="sref">i = 0; i <  104        struc>la (unsigned int req_stats.c#L142" id=" class=ss="line" name="L126"> 126        tr_time_in_state/cpuuency126"> 126  /cpuuencys="s6" id="L56" class="line" name="L56">  562a4ss="lin2">PAGE_SIZE - lef="include/linux/cpL104"> 104        struc>lla (unsigned int w_total_ENTRY_INVAfID126"> 126  w_total_ENTRY_INVAfIDf="i"freq_stats.c#L120" id="L120" class="f">cpuf2lass="sre2">stat->  562afreq_sta2>i]);
  562a>)
len, &qu2id="L117"2class="line" name="L117"2 117<2a>                return PAGE_SIZE;
*  136      lounans_table(strounaef1">* ->show_transPAGE_SIZE - <2 href2"+code=len" class="sref">len, &quo2;\n");
_attr_time_in_state.attr,
stat->(strounaef1">* ="L104" class="lounans_table(strounaef1">* show_trans_attr_time_in_state. 121 >[show_trans      name="L121"> 121 >[stat id="L104" class="kzrllocclass="fref">defzrlloca>);
pufreq_stats.c#alloc_ine"attrs" class="srlloc_ine"c#L5146" class="line"GFP_KERNEf">stat<"="Lt;show_transPAGE_SIZE - policy->stati < stat->len >6" class="line"rrans_table(streaef1">la-6" class="line"ENOMEMlicy" c_stats.cENOMEMfreq6" id="L56" class="line" name="L56">  562ode=i" cl2ss="sref">i]);
(sterrorrouafreq6" id="L56" class="line" name="L56">  562s="sref">2tat->len, &qu2         2     if ( = linuxx/sysfs.h>
stat36"> 136      lounans_table(strounaef1"it;show_trans  562lass="sre2">PAGE_SIZE - _attr_time_in_state.attr,
stat->,
6"> 136      lounans_table(strounaef1"t;show_trans_attr_time_in_state. 120 126        tr_time_in_state/cpuuency126"> 126  /cpuuencys="sr!la (unsigned int w_total_TABLE_END126"> 126  w_total_TABLE_ENDc#L56ss="sref">i = 0; i < PAGE_SIZE - <2 href23" ="sref">len >d="L104" class="line" name="L104"> 104        struc>la (unsigned int req_stats.c#L142" id=" class=ss="line" name="L126"> 126        tr_time_in_state/cpuuency126"> 126  /cpuuencys="s6" id="L56" class="line" name="L56">  562t;\n"2);
 104        struc>lla (unsigned int w_total_ENTRY_INVAfID126"> 126  w_total_ENTRY_INVAfIDf="i"freq_stats.c#L120" id="L120" class="f">cpuf2138  2     if (len >ttttttttcontinue6" id="L56" class="line" name="L56">  562id="L139"2class="line" name="L139"2 139<24ss="sref">len >f="include/linux/cpL104" id="L53" class="line" na1cpu" clas1s="sref">cpu);
 (unsigned int  104        struc"_hre-1"freq_stats.c#L120" id="L120" class="f">cpuf2ufreq_sta2s.c#L140" id="L140" clas2="lin24L130" class="line" name="L130"> 130     >
la (unsigned int L104"> 104        struc6" id="L56" class="line" name="L56">  562iass="sre2s="sref">len;
len, &qu2ode=trans2table" class="sref">tran2_tabl24max_state" clquot;,
       for (la (unsigned int a> = 0;
);
show_trans 143#endif
      name="L121"> 121 >[,"+code=st  odet," cl>la (unsigned int ef">jiffies_1time_in_st  ef">jiffies_1tf="d1it;show_transtota2_tran246rs/cpufreq/creq/cpufreq_statef="+code=st      name="L121"> 121 >[la (unsigned int L104" id="L53" class="line" na1cpu" clas1s="sref">cpu);
 (unsigned int show_transtime_in_st2teshow_trans);
stat(struct show_trans  2ode=attribute" class="sr2f">at2ribute *stat<2  &(sterrorrouafreq:f (!stat<2 freq_sta2="+code=_attr_time_in_st2te" c25eq/cpufpufreq/cpufreq_stats.ruct (struct show_trans{
fail">stat<"="Lt;failfreq:f (!stat<2 de=trans2="+code=_attr_time_in_st2te" c25max_state" clquot;,
default>total_trans);
  52
la (unsigned int sref">stat<"="Lt; *(streaef1"nclude/linux/cpufreq.h"t1aine" nameq_stats_l2pfreq_sta2ss="sref">cpu)
len, &qu2ct <_gror2tuss="line" nam">trruct 2_gror250444,cpuf2is="sass=2sref">PAGE_SIZE -="+2oa hr2f="+coers/cpufreq/ href="+code=_a_notifierfreq/cpufreq_stats.c#L99" id="e=_a_notifierfreq/cpbute<
*f="d16s/cpufreqnb   for (stat<"="Lt;cpuf2t">defaul2ame="L58">  58
len >eq/cp"line" name="L99data"d1ivers/cpufreqatac#L5"freq_stats.c#L120" id="L120" class="f">cpuf2"1sref">g2t1_jiffies_64();
i < );
  73{
)
[  562 ="L121">2121 >[stat<"="Lt;cpuf2"t <_gror2">cpufreq_s> 10 href="+c2de=st2t" ="sref">len >        if (!stat<2q_stats.c2L140" id=i>[stats/cpuuencydef">r_tline" name="L11ufreq_stat/cpuuencydef">r_tli"d1ivers/cpufreq/ href=licy" c_stats.c#L146" iif (!stat<2qs="sass=2);
policy-&greq_stats.c#L142" id=" class="freq_stats.c#L120" id="L120" class="f">cpuf21a">defau2t>        return 0;
len >        if (!stat<2=1"line" 2a1me="L69">  69}
(streaef1">la (unsigned int req_stats.c#L1cre+codr_tline" name="L11ufreq_stats.c#L1cre+codr_tli 03pvers/cpufreq/ hrfreq/cpufreq_stats.c#L69" id="L146" class="line"req_stats.c#L142" id=" class="i"freq_stats.c#L120" id="L120" class="f">cpuf2ode=cpufr2q_stats_update" class="s2ef">c27=len" class="sref">le       6" class="line"rrans_table(streaef1"nclude/linux/cpufreq.h"t1aine" nameq_stats_l21t" class21"sref">ssize_t
stat<2=how_tame2="+code=cpufe" class="sr2f">cp27"drivf="include/linux/cpufreq.h" class="fre"line"2ss" class2"sref">statclass="sr2f">cp27drivers/cpufreq/cpufreq_stats.c#L44" id="L44" cl2licyte="s2ef">cpufreq_se" class="s2ef">c27vers/cpufreqcpufreq_stats.c#L120" id="L120" class="f">cpuf2ruct <_gr2retuss="line" nam">trruc2 <_gr27e=polers/cpufreq/ href="+code=_a_notifierfs="sref">default_attef="+code=_a_notifierfs="srbute<
*f="d16s/cpufreqnb   for (stat<"="Lt;cpuf2cpuf stru2t eq/cp"line" name="L99data"d1ivers/cpufreqatac#L5"freq_stats.c#L120" id="L120" class="f">cpuf2      if 2stat<"L132"> 132
default_attef="+cod/cpuref1">*f="d16s/cpufreqL104"> 104        struc>l74" able" class=data"d1ivers/cpufreqatac#L5nclude/linux/cpufreq.h"t1aine" nameq_stats_l2na1me="L72">  79}
  55{
  562ck);
2a hr1ef="d1ivnameqstats_2ock  562ct" class2cpufeq_stats.c#L51"32"> 232  562chow_tame2 class="sref">buf)
<2a hre284s/cpufreq/cpf="ic#L115" id="L11val">stat<"="Lt;cpuf2ns" class2>  84        stat<2/cpufreq/2cpufreq_stats.c#L85" id=2"L85"28vers/f (!stat<2/uct <_gr2_stats_table,  104        struct cpufreq_stats * 104        strucef="+code=cpufreq_policy" class="srrfreq_freqiif (!stat<2"puf stru2_stats.c#L87" id="L87" c2lass=28eq/cpufreq_stats.f">policy->cpuf2n     if 2a href="drivers/cpufreq/2cpufr28ss="sref">len >= stat<2sref">cpu2freq_stats_update(len, stat->stat<2sk);
2ref">stat->la (unsigned int L104" id="L53" class="line" na1cpu" clas1s="sref">cpu);
 (unsigned int  104        strucef="+code=cpufreq_ponew="line" na1cpu"newfreqiif (!stat<2 stats_l/2t->  562 >(i]));
cpufreq_statsupdtable" clas< ide" >cpufreq_statsupdtaba>);
 (unsigned int L104"> 104        strucef="+code=cpufreq_policy" class="srrfreq_freqiif (!stat<2 s" class2_stats.c#L94" id="L94" c2lass=29req_st;cpuf2code=len"2 class="sref">len;
<2a hre29 name="L105"> 105        if (!stat<2suct <_gr2e" name="L95">  95}
2  97#ifdef lre-1"freq_stats.c#L120" id="L120" class="f">cpuf2      if 2q_stats.c#L98" id="L98" 2class29ss="sref">len >= stat<3ef">cpufr3q_policy *len, buf)
show_trans3101         121 >[la (unsigned int new class="line" na1cpu"new classc#L56" id="L56" class="line" name="L56">  563lass="lin3" name="L102"> 102  3     30  03pref">_attr_time_in_state.attr,
i]));
 121 >[* ="L104" class="tef="+code=st      name="L121"> 121 >[ 136      new class="line" na1cpu"new classc#L5]++6" id="L56" class="line" name="L56">  563>cpufreq_3tats_table, _attr_time_in_state.      name="L121"> 121 >[  563>7req_sta3s" name="L95">  95}
3q_sta30.c#L106" id="L106" class="li=p="sun_sta   for (show_trans  97#ifdef stat<3e9)
P3GE_SIZE - len, stat->  _>   ini=     ers/cpufreq/ href="+code=_a_ef=_callbata   for (*f="d16s/cpufreqnfb   for (cpuf3a="L101">3     if (leeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed="L104" longef="d16s/cpufreqaction   for (cpuf3aass="lin3ivers/cpufreq/cpufreq_st3ts.c#3112" id="L112" class=""""""""""""""""""""""""""""""""eq/cp"line" name="L99hlicy" class="srrfrhcs="sref">cpufreq_stats_table, PAGE_SIZE - stat->stat<3afreq_sta3>i]);
stat<3a>)
i <         unsicasea (unsigned int w_t_ONLINElicy" c_stats.cw_t_ONLINE    :f (!stat<3 class="s3ef">PAGE_SIZE;
stat<3ZE" class3"sref">PAGE_SIZE - <3 href32ss="sref">len >ers/cpufreq/ href="+codupdtab"ass="frefs="sref"1me="L73">  updtab"ass="f"d1ivers/cpufreq/ href=licy" c_stats.c#L146" iif (!stat<3ing">&quo3;\n");
stat<3i="L101">3>stat-> 126  w_t_DEAD    :f (!stat<3Zass="lin3     if (stat<3Z4ss="lin3ivers/cpufreq/cpufreq_st3ts.c#32"drivers/cpuf >ers/cpufreq/ href="+cods.c#L1fass1="line" n1ame="L70">  70
stat<3iass="sre3            break;
stat<3ifreq_sta3>PAGE_SIZE - stat->len       6" class="line"NOTIFY_OKlicy" c_stats.cNOTIFY_OK"sreif (!stat<3ode=i" cl3ss="sref">i]);
  563         3     if (ers/cpufreq/ href="+code=_a_ef=_notifier   for (ers/cpufreq/ hr__cpudata"d1ivers/cpufre__cpudatae=pe i" id="L56" class="line" name="L56">  563 ng">&quo3ufreq/cpufreq_stats.c#L130" id3316s/cass="sref">i < PAGE_SIZE - la (unsigned int ef="+code=_a_ef=_callbata   for (cpuf3 class="s3ef">stat->stat<3d href="d3;
stat<3dass="sre3     if (ers/cpufreq/ hrnotifierfreq/cpfb_sta   for (laass="sref">i < la (unsigned int ef="+code=_a_notifierfreq/cpufreq_stats.c#L99" id="e=_a_notifierfreq/cpbutess="sref">i < PAGE_SIZE - <3 href33" ="s}if (!stat<3dde=i" cl3);
  3     if (ers/cpufreq/ hrnotifierf="L142b_sta   for (laass="sref">i < lentr_time_in_statenotifierfcall   for (la (unsigned int ef="+code=_a_notifierfs="sref">default_attef="+code=_a_notifierfs="srbutess="sref">i < &quo3s.c#L140" id="L140" clas3="lin34L130"}if (!stat<3iass="sre3s="sref">len;
stat<3iclass="s3table" class="sref">tran3_tabl34max_scpufreqcpufreq_stats.c#L120" id="L120" class="f">cpuf3show_tran3_table);
  ef="+code=_as_ini=rs/cpeq/cf">cpufreq_stats_table,  143#endif
i < tota3_tran346rs/cpufreq/cdlass="line" name="rrans_table(streaef1"nclude/linux/cpufreq.h"t1aine" nameq_stats_l3"ass="sre3 class="sref">time_in_st3te);
  3ode=attribute" class="sr3f">at34ers/cpufreq/cpufreq_stats.c#=p="s_sta_ini="+code=st  =p="s_sta_ini=f="d1ivers/cpufreq/cpufrereq_stats.c#L1_sta   for (show_translenf="iinclude/linux/cprrans_table(streaef1">la (unsigned int req_statregisterfnotifier   for (cpuf3 freq_sta3="+code=_attr_time_in_st3te" c35L130" class="line" name="L130pufreq/cpufreq_stats.c#w_total_POLICY_NOTIFIERlicy" c_stats.cw_total_POLICY_NOTIFIERef1"ii"freq_stats.c#L120" id="L120" class="f">cpuf3" name="L3"L51"1{
le       6" class="line"rrans_table(streaef1"nclude/linux/cpufreq.h"t1aine" nameq_stats_l3 de=trans3="+code=_attr_time_in_st3te" c35  03p" id="L56" class="line" name="L56">  563show_tame3"L52">  52
(streaef1">la (unsigned int req_statregisterfnotifier   for (cpuf3  name="L3freq_stats.cNULLime_in_s3ate" 35eq_table" claaaaaaaaame="L130pufreq/cpufreq_stats.c#w_total_TRANSITION_NOTIFIERlicy" c_stats.cw_total_TRANSITION_NOTIFIERef1"ii"aass="sref">i < cpu)
  unregisterfnotifier   for (cpuf3 ass="sre3tuss="line" nam">trruct 3_gror35" ="sref">len >me="L130pufreq/cpufreq_stats.c#w_total_POLICY_NOTIFIERlicy" c_stats.cw_total_POLICY_NOTIFIERef1"include/linux/cpufreq.h"t1aine" nameq_stats_l3 de=i" cl3f="+code=attribute" clas3="sre35ine" name="L87">  87    6" class="line"rrans_table(streaef1"nclude/linux/cpufreq.h"t1aine" nameq_stats_l3 38  3sref">PAGE_SIZE -="+3oa hr35_num" class="ass="sref">len, &qu3t">defaul3ame="L58">  58
len, g3t1_jiffies_64();
);
i <   updtab"ass="f"d1ivers/cpufreq/ href=licy" c_stats.c#L146" iif (!stat<3_how_tame31time_in_state)
len, &qu3t name="L3.c#L102" i>[stat<3 ="L121">3121 >[len, &qu3"t <_gror3">cpufreq_s> 10 href="+c3de=st3t" ="scpufreqeq/css="sref">len, &qu3"de=i" cl3L140" id=i>[  _>exi=     ers/cpufreq/ href="+code=_as_exi="+code=st  ef="+code=_as_exi=rs/cpeq/cf">cpufreq_stats_table, defau3t>        return 0;
lenufreqvoidufreq_stats.c#L107" id="L107"  ide="+code=penclude/linux/cpufreq.h"t1aine" nameq_stats_l3=1"line" 3a1me="L69">  69}
  563ode=cpufr3q_stats_update" class="s3ef">c37te_num" classpufreq_stats.c# L73">  unregisterfnotifier   for (cpuf31t" class31"sref">ssize_t
cp37ufreq/cpufreq_stats.c#L143" >cpufrequnregisterfnotifier   for (cpuf3ss" class3"sref">statclass="sr3f">cp37eq_table" claaaaaaaaame="L130pufreq_stats.c#w_total_TRANSITION_NOTIFIERlicy" c_stats.cw_total_TRANSITION_NOTIFIERef1"include/linux/cpufreq.h"t1aine" nameq_stats_l3=="L121">3ef">cpufreq_se" class="s3ef">c376rs/cpufreq/creq/cpufreq_staunregisterfhotef=_notifier   for (trruc3 <_gr37.c#L106" id="L106" class="lifor_each_oni < ers/cpufreq/ href="+cods.c#L1fass1="line" n1ame="L70">  70
stat<3      if 3len, &qu3" class="3ref">stat<"L132"> 132len, &qu3"1"line" 3">  79}
  563ck);
3a hr1ef="d1ivnameqstats_3ock"Zou Nanihai <nanhai.zou@ufrel.com"L12"stat<3ct" class3cpufeq_stats.c#L51"32"> 332"'lass="sref">s' - A f="+co to export lass="s ef">s "stat<3chow_tame3 class="sref">buf)
<3a hre38"drivers/cpuf >m" class="sref">espanicy" c_sttring">"through sysfs filesystem"stat<3cs" class3>  84        "GPL"stat<3c="L121">3cpufreq_stats.c#L85" id=3"L85"38vers/f (!stat<3/uct <_gr3_stats_table,   module_ini=rs/cpers/cpufreq/ href="+code=_as_ini="+code=st  ef="+code=_as_ini=rs/ciif (!stat<3cpuf stru3_stats.c#L87" id="L87" c3lass=38de=sters/cpufreq/ hrmodule_exi="+code=st  module_exi=rs/cpers/cpufreq/ href="+code=_as_exi="+code=st  ef="+code=_as_exi=rs/ciif (!stat<3c     if 3a href="drivers/cpufreq/3cpufr38ss="s


The original LXR software by thea (unsignehttp://sourceforge.net/projects/lxr">LXR communi=id="L14this experimental +codion by (unsignemailto:lxr@verux.no">lxr@verux.nod="L.
lxr.verux.no kindly hosted by (unsignehttp://www.redpill-verpro.no">Redpill Lerpro ASd="L14providco of Leruxtconsulting and operations services since 1995.