linux/kernel/lockdep_proc.c
<<
e="v1e="v1e=//spa6.3e=/spa6 class="lxr_search">e="ve="v1e="v1e="v1typ Searche="v1e=//spa6.3"v1< e=/input typ e"v1< 3 /div id < <1//a>/spa6 class="comment">/*//spa6.3< <2//a>/spa6 class="comment"> * kernel/lockdep_proc.c//spa6.3< <3//a>/spa6 class="comment"> *//spa6.3< <4//a>/spa6 class="comment"> * Runtime locking correctness idator//spa6.3< <5//a>/spa6 class="comment"> *//spa6.3< <6//a>/spa6 class="comment"> * Started by Ingo Molnar://spa6.3< <7//a>/spa6 class="comment"> *//spa6.3< <8//a>/spa6 class="comment"> * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>//spa6.3< <9//a>/spa6 class="comment"> * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>//spa6.3< v3a>/spa6 class="comment"> *//spa6.3< 11//a>/spa6 class="comment"> * Code for /proc/lockdep and /proc/lockdep_stats://spa6.3< 12//a>/spa6 class="comment"> *//spa6.3< 13//a>/spa6 class="comment"> *///spa6.3< 14//a>#include <linux/export.h//a>>3< 15//a>#include <linux/proc_fs.h//a>>3< 16//a>#include <linux/seq_file.h//a>>3< 17//a>#include <linux/kallsyms.h//a>>3< 18//a>#include <linux/debug_locks.h//a>>3< 19//a>#include <linux/vmalloc.h//a>>3< 20//a>#include <linux/sort.h//a>>3< 21//a>#include <asm/uaccess.h//a>>3< 22//a>#include <asm/div64.h//a>>3< 23//a>3< 24//a>#include "lockdep_internals.h//a>"3< 25//a>3< 26//a>static void */a href="+code=l_next" class="sref">l_next//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=pos" class="sref">pos//a>)3< 27//a>{3< 28//a> return /a href="+code=seq_list_next" class="sref">seq_list_next//a>(/a href="+code=v" class="sref">v//a>, &/a href="+code=all_lock_classes" class="sref">all_lock_classes//a>, /a href="+code=pos" class="sref">pos//a>);3< 29//a>}3< 30//a>3< 31//a>static void */a href="+code=l_start" class="sref">l_start//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=pos" class="sref">pos//a>)3< 32//a>{3< 33//a> return /a href="+code=seq_list_start_head" class="sref">seq_list_start_head//a>(&/a href="+code=all_lock_classes" class="sref">all_lock_classes//a>, */a href="+code=pos" class="sref">pos//a>);3< 34//a>}3< 35//a>3< 36//a>static void /a href="+code=l_stop" class="sref">l_stop//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3< 37//a>{3< 38//a>}3< 39//a>3< 40//a>static void /a href="+code=print_nam " class="sref">print_nam //a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>)3< 41//a>{3< 42//a> char /a href="+code=str" class="sref">str//a>[128];3< 43//a> const char */a href="+code=nam " class="sref">nam //a> = /a href="+code=class" class="sref">class//a>->/a href="+code=nam " class="sref">nam //a>;3< 44//a>3< 45//a> if (!/a href="+code=nam " class="sref">nam //a>) {3< 46//a> /a href="+code=nam " class="sref">nam //a> = /a href="+code=__get_key_nam " class="sref">__get_key_nam //a>(/a href="+code=class" class="sref">class//a>->/a href="+code=key" class="sref">key//a>, /a href="+code=str" class="sref">str//a>);3< 47//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%s"nam //a>);3< 48//a> } else{3< 49//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%s"nam //a>);3< 50//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=nam _version" class="sref">nam _version//a> > 1)3< 51//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"#%d"class//a>->/a href="+code=nam _version" class="sref">nam _version//a>);3< 52//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=subclass" class="sref">subclass//a>)3< 53//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"/%d"class//a>->/a href="+code=subclass" class="sref">subclass//a>);3< 54//a> }3< 55//a>}3< 56//a>3< 57//a>static int /a href="+code=l_show" class="sref">l_show//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3< 58//a>{3< 59//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a> = /a href="+code=list_entry" class="sref">list_entry//a>(/a href="+code=v" class="sref">v//a>, struct /a href="+code=lock_class" class="sref">lock_class//a>, /a href="+code=lock_entry" class="sref">lock_entry//a>);3< 60//a> struct /a href="+code=lock_list" class="sref">lock_list//a> */a href="+code=entry" class="sref">entry//a>;3< 61//a> char /a href="+code=usage" class="sref">usage//a>[/a href="+code=LOCK_USAGE_CHARS" class="sref">LOCK_USAGE_CHARS//a>];3< 62//a>3< 63//a> if (/a href="+code=v" class="sref">v//a> == &/a href="+code=all_lock_classes" class="sref">all_lock_classes//a>) {3< 64//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"all lock classes:\n"< 65//a> return 0;3< 66//a> }3< 67//a>3< 68//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%p"class//a>->/a href="+code=key" class="sref">key//a>);3< 69//a>#ifdef /a href="+code=CONFIG_DEBUG_LOCKDEP" class="sref">CONFIG_DEBUG_LOCKDEP//a>3< 70//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" OPS:%8ld"class//a>->/a href="+code=ops" class="sref">ops//a>);3< 71//a>#endif3< 72//a>#ifdef /a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING//a>3< 73//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" FD:%5ld"lockdep_count_forward_deps//a>(/a href="+code=class" class="sref">class//a>));3< 74//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" BD:%5ld"lockdep_count_backward_deps//a>(/a href="+code=class" class="sref">class//a>));3< 75//a>#endif3< 76//a>3< 77//a> /a href="+code=get_usage_chars" class="sref">get_usage_chars//a>(/a href="+code=class" class="sref">class//a>, /a href="+code=usage" class="sref">usage//a>);3< 78//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" %s"usage//a>);3< 79//a>3< 80//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">": "< 81//a> /a href="+code=print_nam " class="sref">print_nam //a>(/a href="+code=m" class="sref">m//a>, /a href="+code=class" class="sref">class//a>);3< 82//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"< 83//a>3< 84//a> /a href="+code=list_for_each_entry" class="sref">list_for_each_entry//a>(/a href="+code=entry" class="sref">entry//a>, &/a href="+code=class" class="sref">class//a>->/a href="+code=locks_after" class="sref">locks_after//a>, /a href="+code=entry" class="sref">entry//a>) {3< 85//a> if (/a href="+code=entry" class="sref">entry//a>->/a href="+code=distanc " class="sref">distanc //a> == 1) {3< 86//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" -> [%p] "entry//a>->/a href="+code=class" class="sref">class//a>->/a href="+code=key" class="sref">key//a>);3< 87//a> /a href="+code=print_nam " class="sref">print_nam //a>(/a href="+code=m" class="sref">m//a>, /a href="+code=entry" class="sref">entry//a>->/a href="+code=class" class="sref">class//a>);3< 88//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"< 89//a> }3< 90//a> }3< 91//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"< 92//a>3< 93//a> return 0;3< 94//a>}3< 95//a>3< 96//a>static const struct /a href="+code=seq_operav2.6s" class="sref">seq_operav2.6s//a> /a href="+code=lockdep_ops" class="sref">lockdep_ops//a> = {3< 97//a> ./a href="+code=start" class="sref">start//a> = /a href="+code=l_start" class="sref">l_start//a>,3< 98//a> ./a href="+code=next" class="sref">next//a> = /a href="+code=l_next" class="sref">l_next//a>,3< 99//a> ./a href="+code=stop" class="sref">stop//a> = /a href="+code=l_stop" class="sref">l_stop//a>,3<100//a> ./a href="+code=show" class="sref">show//a> = /a href="+code=l_show" class="sref">l_show//a>,3<101//a>};3<102//a>3<103//a>static int /a href="+code=lockdep_open" class="sref">lockdep_open//a>(struct /a href="+code=inode" class="sref">inode//a> */a href="+code=inode" class="sref">inode//a>, struct /a href="+code=file" class="sref">file//a> */a href="+code=file" class="sref">file//a>)3<104//a>{3<105//a> return /a href="+code=seq_open" class="sref">seq_open//a>(/a href="+code=file" class="sref">file//a>, &/a href="+code=lockdep_ops" class="sref">lockdep_ops//a>);3<106//a>}3<107//a>3<108//a>static const struct /a href="+code=file_operav2.6s" class="sref">file_operav2.6s//a> /a href="+code=proc_lockdep_operav2.6s" class="sref">proc_lockdep_operav2.6s//a> = {3<109//a> ./a href="+code=open" class="sref">open//a> = /a href="+code=lockdep_open" class="sref">lockdep_open//a>,3<110//a> ./a href="+code=read" class="sref">read//a> = /a href="+code=seq_read" class="sref">seq_read//a>,3<111//a> ./a href="+code=llseek" class="sref">llseek//a> = /a href="+code=seq_lseek" class="sref">seq_lseek//a>,3<112//a> ./a href="+code=release" class="sref">release//a> = /a href="+code=seq_release" class="sref">seq_release//a>,3<113//a>};3<114//a>3<115//a>#ifdef /a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING//a>3<116//a>static void */a href="+code=lc_start" class="sref">lc_start//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=pos" class="sref">pos//a>)3<117//a>{3<118//a> if (*/a href="+code=pos" class="sref">pos//a> == 0)3<119//a> return /a href="+code=SEQ_START_TOKEN" class="sref">SEQ_START_TOKEN//a>;3<120//a>3<121//a> if (*/a href="+code=pos" class="sref">pos//a> - 1 < /a href="+code=nr_lock_chai6s" class="sref">nr_lock_chai6s//a>)3<122//a> return /a href="+code=lock_chai6s" class="sref">lock_chai6s//a> + (*/a href="+code=pos" class="sref">pos//a> - 1);3<123//a>3<124//a> return /a href="+code=NULL" class="sref">NULL//a>;3<125//a>}3<126//a>3<127//a>static void */a href="+code=lc_next" class="sref">lc_next//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=pos" class="sref">pos//a>)3<128//a>{3<129//a> (*/a href="+code=pos" class="sref">pos//a>)++;3<130//a> return /a href="+code=lc_start" class="sref">lc_start//a>(/a href="+code=m" class="sref">m//a>, /a href="+code=pos" class="sref">pos//a>);3<131//a>}3<132//a>3<133//a>static void /a href="+code=lc_stop" class="sref">lc_stop//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3<134//a>{3<135//a>}3<136//a>3<137//a>static int /a href="+code=lc_show" class="sref">lc_show//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3<138//a>{3<139//a> struct /a href="+code=lock_chai6" class="sref">lock_chai6//a> */a href="+code=chai6" class="sref">chai6//a> = /a href="+code=v" class="sref">v//a>;3<140//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>;3<141//a> int /a href="+code=i" class="sref">i//a>;3<142//a>3<143//a> if (/a href="+code=v" class="sref">v//a> == /a href="+code=SEQ_START_TOKEN" class="sref">SEQ_START_TOKEN//a>) {3<144//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"all lock chai6s:\n"<145//a> return 0;3<146//a> }3<147//a>3<148//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"irq_context: %d\n"chai6//a>->/a href="+code=irq_context" class="sref">irq_context//a>);3<149//a>3<150//a> for (/a href="+code=i" class="sref">i//a> = 0; /a href="+code=i" class="sref">i//a> < /a href="+code=chai6" class="sref">chai6//a>->/a href="+code=depth" class="sref">depth//a>; /a href="+code=i" class="sref">i//a>++) {3<151//a> /a href="+code=class" class="sref">class//a> = /a href="+code=lock_chai6_get_class" class="sref">lock_chai6_get_class//a>(/a href="+code=chai6" class="sref">chai6//a>, /a href="+code=i" class="sref">i//a>);3<152//a> if (!/a href="+code=class" class="sref">class//a>->/a href="+code=key" class="sref">key//a>)3<153//a> continue;3<154//a>3<155//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"[%p] "class//a>->/a href="+code=key" class="sref">key//a>);3<156//a> /a href="+code=print_nam " class="sref">print_nam //a>(/a href="+code=m" class="sref">m//a>, /a href="+code=class" class="sref">class//a>);3<157//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<158//a> }3<159//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<160//a>3<161//a> return 0;3<162//a>}3<163//a>3<164//a>static const struct /a href="+code=seq_operav2.6s" class="sref">seq_operav2.6s//a> /a href="+code=lockdep_chai6s_ops" class="sref">lockdep_chai6s_ops//a> = {3<165//a> ./a href="+code=start" class="sref">start//a> = /a href="+code=lc_start" class="sref">lc_start//a>,3<166//a> ./a href="+code=next" class="sref">next//a> = /a href="+code=lc_next" class="sref">lc_next//a>,3<167//a> ./a href="+code=stop" class="sref">stop//a> = /a href="+code=lc_stop" class="sref">lc_stop//a>,3<168//a> ./a href="+code=show" class="sref">show//a> = /a href="+code=lc_show" class="sref">lc_show//a>,3<169//a>};3<170//a>3<171//a>static int /a href="+code=lockdep_chai6s_open" class="sref">lockdep_chai6s_open//a>(struct /a href="+code=inode" class="sref">inode//a> */a href="+code=inode" class="sref">inode//a>, struct /a href="+code=file" class="sref">file//a> */a href="+code=file" class="sref">file//a>)3<172//a>{3<173//a> return /a href="+code=seq_open" class="sref">seq_open//a>(/a href="+code=file" class="sref">file//a>, &/a href="+code=lockdep_chai6s_ops" class="sref">lockdep_chai6s_ops//a>);3<174//a>}3<175//a>3<176//a>static const struct /a href="+code=file_operav2.6s" class="sref">file_operav2.6s//a> /a href="+code=proc_lockdep_chai6s_operav2.6s" class="sref">proc_lockdep_chai6s_operav2.6s//a> = {3<177//a> ./a href="+code=open" class="sref">open//a> = /a href="+code=lockdep_chai6s_open" class="sref">lockdep_chai6s_open//a>,3<178//a> ./a href="+code=read" class="sref">read//a> = /a href="+code=seq_read" class="sref">seq_read//a>,3<179//a> ./a href="+code=llseek" class="sref">llseek//a> = /a href="+code=seq_lseek" class="sref">seq_lseek//a>,3<180//a> ./a href="+code=release" class="sref">release//a> = /a href="+code=seq_release" class="sref">seq_release//a>,3<181//a>};3<182//a>#endif /spa6 class="comment">/* CONFIG_PROVE_LOCKING *///spa6.3<183//a>3<184//a>static void /a href="+code=lockdep_stats_debug_show" class="sref">lockdep_stats_debug_show//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>)3<185//a>{3<186//a>#ifdef /a href="+code=CONFIG_DEBUG_LOCKDEP" class="sref">CONFIG_DEBUG_LOCKDEP//a>3<187//a> unsigned long long /a href="+code=hi1" class="sref">hi1//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=hardirqs_on_events" class="sref">hardirqs_on_events//a>),3<188//a> /a href="+code=hi2" class="sref">hi2//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=hardirqs_off_events" class="sref">hardirqs_off_events//a>),3<189//a> /a href="+code=hr1" class="sref">hr1//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=redundant_hardirqs_on" class="sref">redundant_hardirqs_on//a>),3<190//a> /a href="+code=hr2" class="sref">hr2//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=redundant_hardirqs_off" class="sref">redundant_hardirqs_off//a>),3<191//a> /a href="+code=si1" class="sref">si1//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=softirqs_on_events" class="sref">softirqs_on_events//a>),3<192//a> /a href="+code=si2" class="sref">si2//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=softirqs_off_events" class="sref">softirqs_off_events//a>),3<193//a> /a href="+code=sr1" class="sref">sr1//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=redundant_softirqs_on" class="sref">redundant_softirqs_on//a>),3<194//a> /a href="+code=sr2" class="sref">sr2//a> = /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=redundant_softirqs_off" class="sref">redundant_softirqs_off//a>);3<195//a>3<196//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" chai6 lookup misses: %11llu\n"<197//a> /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=chai6_lookup_misses" class="sref">chai6_lookup_misses//a>));3<198//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" chai6 lookup hits: %11llu\n"<199//a> /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=chai6_lookup_hits" class="sref">chai6_lookup_hits//a>));3<200//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" cyclic checks: %11llu\n"<201//a> /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=nr_cyclic_checks" class="sref">nr_cyclic_checks//a>));3<202//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" find-mask forwards checks: %11llu\n"<203//a> /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=nr_find_usage_forwards_checks" class="sref">nr_find_usage_forwards_checks//a>));3<204//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" find-mask backwards checks: %11llu\n"<205//a> /a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=nr_find_usage_backwards_checks" class="sref">nr_find_usage_backwards_checks//a>));3<206//a>3<207//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" hardirq on events: %11llu\n"hi1//a>);3<208//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" hardirq off events: %11llu\n"hi2//a>);3<209//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" redundant hardirq ons: %11llu\n"hr1//a>);3<210//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" redundant hardirq offs: %11llu\n"hr2//a>);3<211//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" softirq on events: %11llu\n"si1//a>);3<212//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" softirq off events: %11llu\n"si2//a>);3<213//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" redundant softirq ons: %11llu\n"sr1//a>);3<214//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" redundant softirq offs: %11llu\n"sr2//a>);3<215//a>#endif3<216//a>}3<217//a>3<218//a>static int /a href="+code=lockdep_stats_show" class="sref">lockdep_stats_show//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3<219//a>{3<220//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>;3<221//a> unsigned long /a href="+code=nr_unused" class="sref">nr_unused//a> = 0, /a href="+code=nr_uncategorized" class="sref">nr_uncategorized//a> = 0,3<222//a> /a href="+code=nr_irq_safe" class="sref">nr_irq_safe//a> = 0, /a href="+code=nr_irq_unsafe" class="sref">nr_irq_unsafe//a> = 0,3<223//a> /a href="+code=nr_softirq_safe" class="sref">nr_softirq_safe//a> = 0, /a href="+code=nr_softirq_unsafe" class="sref">nr_softirq_unsafe//a> = 0,3<224//a> /a href="+code=nr_hardirq_safe" class="sref">nr_hardirq_safe//a> = 0, /a href="+code=nr_hardirq_unsafe" class="sref">nr_hardirq_unsafe//a> = 0,3<225//a> /a href="+code=nr_irq_read_safe" class="sref">nr_irq_read_safe//a> = 0, /a href="+code=nr_irq_read_unsafe" class="sref">nr_irq_read_unsafe//a> = 0,3<226//a> /a href="+code=nr_softirq_read_safe" class="sref">nr_softirq_read_safe//a> = 0, /a href="+code=nr_softirq_read_unsafe" class="sref">nr_softirq_read_unsafe//a> = 0,3<227//a> /a href="+code=nr_hardirq_read_safe" class="sref">nr_hardirq_read_safe//a> = 0, /a href="+code=nr_hardirq_read_unsafe" class="sref">nr_hardirq_read_unsafe//a> = 0,3<228//a> /a href="+code=sum_forward_deps" class="sref">sum_forward_deps//a> = 0;3<229//a>3<230//a> /a href="+code=list_for_each_entry" class="sref">list_for_each_entry//a>(/a href="+code=class" class="sref">class//a>, &/a href="+code=all_lock_classes" class="sref">all_lock_classes//a>, /a href="+code=lock_entry" class="sref">lock_entry//a>) {3<231//a>3<232//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> == 0)3<233//a> /a href="+code=nr_unused" class="sref">nr_unused//a>++;3<234//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> == /a href="+code=LOCKF_USED" class="sref">LOCKF_USED//a>)3<235//a> /a href="+code=nr_uncategorized" class="sref">nr_uncategorized//a>++;3<236//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_USED_IN_IRQ" class="sref">LOCKF_USED_IN_IRQ//a>)3<237//a> /a href="+code=nr_irq_safe" class="sref">nr_irq_safe//a>++;3<238//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_ENABLED_IRQ" class="sref">LOCKF_ENABLED_IRQ//a>)3<239//a> /a href="+code=nr_irq_unsafe" class="sref">nr_irq_unsafe//a>++;3<240//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_USED_IN_SOFTIRQ" class="sref">LOCKF_USED_IN_SOFTIRQ//a>)3<241//a> /a href="+code=nr_softirq_safe" class="sref">nr_softirq_safe//a>++;3<242//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_ENABLED_SOFTIRQ" class="sref">LOCKF_ENABLED_SOFTIRQ//a>)3<243//a> /a href="+code=nr_softirq_unsafe" class="sref">nr_softirq_unsafe//a>++;3<244//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_USED_IN_HARDIRQ" class="sref">LOCKF_USED_IN_HARDIRQ//a>)3<245//a> /a href="+code=nr_hardirq_safe" class="sref">nr_hardirq_safe//a>++;3<246//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_ENABLED_HARDIRQ" class="sref">LOCKF_ENABLED_HARDIRQ//a>)3<247//a> /a href="+code=nr_hardirq_unsafe" class="sref">nr_hardirq_unsafe//a>++;3<248//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_USED_IN_IRQ_READ" class="sref">LOCKF_USED_IN_IRQ_READ//a>)3<249//a> /a href="+code=nr_irq_read_safe" class="sref">nr_irq_read_safe//a>++;3<250//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_ENABLED_IRQ_READ" class="sref">LOCKF_ENABLED_IRQ_READ//a>)3<251//a> /a href="+code=nr_irq_read_unsafe" class="sref">nr_irq_read_unsafe//a>++;3<252//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_USED_IN_SOFTIRQ_READ" class="sref">LOCKF_USED_IN_SOFTIRQ_READ//a>)3<253//a> /a href="+code=nr_softirq_read_safe" class="sref">nr_softirq_read_safe//a>++;3<254//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_ENABLED_SOFTIRQ_READ" class="sref">LOCKF_ENABLED_SOFTIRQ_READ//a>)3<255//a> /a href="+code=nr_softirq_read_unsafe" class="sref">nr_softirq_read_unsafe//a>++;3<256//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_USED_IN_HARDIRQ_READ" class="sref">LOCKF_USED_IN_HARDIRQ_READ//a>)3<257//a> /a href="+code=nr_hardirq_read_safe" class="sref">nr_hardirq_read_safe//a>++;3<258//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=usage_mask" class="sref">usage_mask//a> & /a href="+code=LOCKF_ENABLED_HARDIRQ_READ" class="sref">LOCKF_ENABLED_HARDIRQ_READ//a>)3<259//a> /a href="+code=nr_hardirq_read_unsafe" class="sref">nr_hardirq_read_unsafe//a>++;3<260//a>3<261//a>#ifdef /a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING//a>3<262//a> /a href="+code=sum_forward_deps" class="sref">sum_forward_deps//a> += /a href="+code=lockdep_count_forward_deps" class="sref">lockdep_count_forward_deps//a>(/a href="+code=class" class="sref">class//a>);3<263//a>#endif3<264//a> }3<265//a>#ifdef /a href="+code=CONFIG_DEBUG_LOCKDEP" class="sref">CONFIG_DEBUG_LOCKDEP//a>3<266//a> /a href="+code=DEBUG_LOCKS_WARN_ON" class="sref">DEBUG_LOCKS_WARN_ON//a>(/a href="+code=debug_atomic_read" class="sref">debug_atomic_read//a>(/a href="+code=nr_unused_locks" class="sref">nr_unused_locks//a>) != /a href="+code=nr_unused" class="sref">nr_unused//a>);3<267//a>#endif3<268//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" lock-classes: %11lu [max: %lu]\n"<269//a> /a href="+code=nr_lock_classes" class="sref">nr_lock_classes//a>, /a href="+code=MAX_LOCKDEP_KEYS" class="sref">MAX_LOCKDEP_KEYS//a>);3<270//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" direct dependencies: %11lu [max: %lu]\n"<271//a> /a href="+code=nr_list_entries" class="sref">nr_list_entries//a>, /a href="+code=MAX_LOCKDEP_ENTRIES" class="sref">MAX_LOCKDEP_ENTRIES//a>);3<272//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" indirect dependencies: %11lu\n"<273//a> /a href="+code=sum_forward_deps" class="sref">sum_forward_deps//a>);3<274//a>3<275//a> /spa6 class="comment">/*//spa6.3<276//a>/spa6 class="comment"> * Total number of dependencies://spa6.3<277//a>/spa6 class="comment"> *//spa6.3<278//a>/spa6 class="comment"> * All irq-safe locks may nest inside irq-unsafe locks,//spa6.3<279//a>/spa6 class="comment"> * plus all the other known dependencies://spa6.3<280//a>/spa6 class="comment"> *///spa6.3<281//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" all direct dependencies: %11lu\n"<282//a> /a href="+code=nr_irq_unsafe" class="sref">nr_irq_unsafe//a> * /a href="+code=nr_irq_safe" class="sref">nr_irq_safe//a> +3<283//a> /a href="+code=nr_hardirq_unsafe" class="sref">nr_hardirq_unsafe//a> * /a href="+code=nr_hardirq_safe" class="sref">nr_hardirq_safe//a> +3<284//a> /a href="+code=nr_list_entries" class="sref">nr_list_entries//a>);3<285//a>3<286//a>#ifdef /a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING//a>3<287//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" dependency chai6s: %11lu [max: %lu]\n"<288//a> /a href="+code=nr_lock_chai6s" class="sref">nr_lock_chai6s//a>, /a href="+code=MAX_LOCKDEP_CHAINS" class="sref">MAX_LOCKDEP_CHAINS//a>);3<289//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" dependency chai6 hlocks: %11d [max: %lu]\n"<290//a> /a href="+code=nr_chai6_hlocks" class="sref">nr_chai6_hlocks//a>, /a href="+code=MAX_LOCKDEP_CHAIN_HLOCKS" class="sref">MAX_LOCKDEP_CHAIN_HLOCKS//a>);3<291//a>#endif3<292//a>3<293//a>#ifdef /a href="+code=CONFIG_TRACE_IRQFLAGS" class="sref">CONFIG_TRACE_IRQFLAGS//a>3<294//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" in-hardirq chai6s: %11u\n"<295//a> /a href="+code=nr_hardirq_chai6s" class="sref">nr_hardirq_chai6s//a>);3<296//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" in-softirq chai6s: %11u\n"<297//a> /a href="+code=nr_softirq_chai6s" class="sref">nr_softirq_chai6s//a>);3<298//a>#endif3<299//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" in-process chai6s: %11u\n"<300//a> /a href="+code=nr_process_chai6s" class="sref">nr_process_chai6s//a>);3<301//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" stack-trace entries: %11lu [max: %lu]\n"<302//a> /a href="+code=nr_stack_trace_entries" class="sref">nr_stack_trace_entries//a>, /a href="+code=MAX_STACK_TRACE_ENTRIES" class="sref">MAX_STACK_TRACE_ENTRIES//a>);3<303//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" combined max dependencies: %11u\n"<304//a> (/a href="+code=nr_hardirq_chai6s" class="sref">nr_hardirq_chai6s//a> + 1) *3<305//a> (/a href="+code=nr_softirq_chai6s" class="sref">nr_softirq_chai6s//a> + 1) *3<306//a> (/a href="+code=nr_process_chai6s" class="sref">nr_process_chai6s//a> + 1)3<307//a> );3<308//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" hardirq-safe locks: %11lu\n"<309//a> /a href="+code=nr_hardirq_safe" class="sref">nr_hardirq_safe//a>);3<310//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" hardirq-unsafe locks: %11lu\n"<311//a> /a href="+code=nr_hardirq_unsafe" class="sref">nr_hardirq_unsafe//a>);3<312//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" softirq-safe locks: %11lu\n"<313//a> /a href="+code=nr_softirq_safe" class="sref">nr_softirq_safe//a>);3<314//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" softirq-unsafe locks: %11lu\n"<315//a> /a href="+code=nr_softirq_unsafe" class="sref">nr_softirq_unsafe//a>);3<316//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" irq-safe locks: %11lu\n"<317//a> /a href="+code=nr_irq_safe" class="sref">nr_irq_safe//a>);3<318//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" irq-unsafe locks: %11lu\n"<319//a> /a href="+code=nr_irq_unsafe" class="sref">nr_irq_unsafe//a>);3<320//a>3<321//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" hardirq-read-safe locks: %11lu\n"<322//a> /a href="+code=nr_hardirq_read_safe" class="sref">nr_hardirq_read_safe//a>);3<323//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" hardirq-read-unsafe locks: %11lu\n"<324//a> /a href="+code=nr_hardirq_read_unsafe" class="sref">nr_hardirq_read_unsafe//a>);3<325//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" softirq-read-safe locks: %11lu\n"<326//a> /a href="+code=nr_softirq_read_safe" class="sref">nr_softirq_read_safe//a>);3<327//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" softirq-read-unsafe locks: %11lu\n"<328//a> /a href="+code=nr_softirq_read_unsafe" class="sref">nr_softirq_read_unsafe//a>);3<329//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" irq-read-safe locks: %11lu\n"<330//a> /a href="+code=nr_irq_read_safe" class="sref">nr_irq_read_safe//a>);3<331//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" irq-read-unsafe locks: %11lu\n"<332//a> /a href="+code=nr_irq_read_unsafe" class="sref">nr_irq_read_unsafe//a>);3<333//a>3<334//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" uncategorized locks: %11lu\n"<335//a> /a href="+code=nr_uncategorized" class="sref">nr_uncategorized//a>);3<336//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" unused locks: %11lu\n"<337//a> /a href="+code=nr_unused" class="sref">nr_unused//a>);3<338//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" max locking depth: %11u\n"<339//a> /a href="+code=max_lockdep_depth" class="sref">max_lockdep_depth//a>);3<340//a>#ifdef /a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING//a>3<341//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" max bfs queue depth: %11u\n"<342//a> /a href="+code=max_bfs_queue_depth" class="sref">max_bfs_queue_depth//a>);3<343//a>#endif3<344//a> /a href="+code=lockdep_stats_debug_show" class="sref">lockdep_stats_debug_show//a>(/a href="+code=m" class="sref">m//a>);3<345//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" debug_locks: %11u\n"<346//a> /a href="+code=debug_locks" class="sref">debug_locks//a>);3<347//a>3<348//a> return 0;3<349//a>}3<350//a>3<351//a>static int /a href="+code=lockdep_stats_open" class="sref">lockdep_stats_open//a>(struct /a href="+code=inode" class="sref">inode//a> */a href="+code=inode" class="sref">inode//a>, struct /a href="+code=file" class="sref">file//a> */a href="+code=file" class="sref">file//a>)3<352//a>{3<353//a> return /a href="+code=single_open" class="sref">single_open//a>(/a href="+code=file" class="sref">file//a>, /a href="+code=lockdep_stats_show" class="sref">lockdep_stats_show//a>, /a href="+code=NULL" class="sref">NULL//a>);3<354//a>}3<355//a>3<356//a>static const struct /a href="+code=file_operatio6s" class="sref">file_operatio6s//a> /a href="+code=proc_lockdep_stats_operatio6s" class="sref">proc_lockdep_stats_operatio6s//a> = {3<357//a> ./a href="+code=open" class="sref">open//a> = /a href="+code=lockdep_stats_open" class="sref">lockdep_stats_open//a>,3<358//a> ./a href="+code=read" class="sref">read//a> = /a href="+code=seq_read" class="sref">seq_read//a>,3<359//a> ./a href="+code=llseek" class="sref">llseek//a> = /a href="+code=seq_lseek" class="sref">seq_lseek//a>,3<360//a> ./a href="+code=release" class="sref">release//a> = /a href="+code=single_release" class="sref">single_release//a>,3<361//a>};3<362//a>3<363//a>#ifdef /a href="+code=CONFIG_LOCK_STAT" class="sref">CONFIG_LOCK_STAT//a>3<364//a>3<365//a>struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> {3<366//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>;3<367//a> struct /a href="+code=lock_class_stats" class="sref">lock_class_stats//a> /a href="+code=stats" class="sref">stats//a>;3<368//a>};3<369//a>3<370//a>struct /a href="+code=lock_stat_seq" class="sref">lock_stat_seq//a> {3<371//a> struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> */a href="+code=iter_end" class="sref">iter_end//a>;3<372//a> struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> /a href="+code=stats" class="sref">stats//a>[/a href="+code=MAX_LOCKDEP_KEYS" class="sref">MAX_LOCKDEP_KEYS//a>];3<373//a>};3<374//a>3<375//a>/spa6 class="comment">/*//spa6.3<376//a>/spa6 class="comment"> * sort on absolute number of contentio6s//spa6.3<377//a>/spa6 class="comment"> *///spa6.3<378//a>static int /a href="+code=lock_stat_cmp" class="sref">lock_stat_cmp//a>(const void */a href="+code=l" class="sref">l//a>, const void */a href="+code=r" class="sref">r//a>)3<379//a>{3<380//a> const struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> */a href="+code=dl" class="sref">dl//a> = /a href="+code=l" class="sref">l//a>, */a href="+code=dr" class="sref">dr//a> = /a href="+code=r" class="sref">r//a>;3<381//a> unsigned long /a href="+code=nl" class="sref">nl//a>, /a href="+code=nr" class="sref">nr//a>;3<382//a>3<383//a> /a href="+code=nl" class="sref">nl//a> = /a href="+code=dl" class="sref">dl//a>->/a href="+code=stats" class="sref">stats//a>./a href="+code=read_waittime" class="sref">read_waittime//a>./a href="+code=nr" class="sref">nr//a> + /a href="+code=dl" class="sref">dl//a>->/a href="+code=stats" class="sref">stats//a>./a href="+code=write_waittime" class="sref">write_waittime//a>./a href="+code=nr" class="sref">nr//a>;3<384//a> /a href="+code=nr" class="sref">nr//a> = /a href="+code=dr" class="sref">dr//a>->/a href="+code=stats" class="sref">stats//a>./a href="+code=read_waittime" class="sref">read_waittime//a>./a href="+code=nr" class="sref">nr//a> + /a href="+code=dr" class="sref">dr//a>->/a href="+code=stats" class="sref">stats//a>./a href="+code=write_waittime" class="sref">write_waittime//a>./a href="+code=nr" class="sref">nr//a>;3<385//a>3<386//a> return /a href="+code=nr" class="sref">nr//a> - /a href="+code=nl" class="sref">nl//a>;3<387//a>}3<388//a>3<389//a>static void /a href="+code=seq_line" class="sref">seq_line//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, char /a href="+code=c" class="sref">c//a>, int /a href="+code=offset" class="sref">offset//a>, int /a href="+code=length" class="sref">length//a>)3<390//a>{3<391//a> int /a href="+code=i" class="sref">i//a>;3<392//a>3<393//a> for (/a href="+code=i" class="sref">i//a> = 0; /a href="+code=i" class="sref">i//a> < /a href="+code=offset" class="sref">offset//a>; /a href="+code=i" class="sref">i//a>++)3<394//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" "<395//a> for (/a href="+code=i" class="sref">i//a> = 0; /a href="+code=i" class="sref">i//a> < /a href="+code=length" class="sref">length//a>; /a href="+code=i" class="sref">i//a>++)3<396//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%c"c//a>);3<397//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<398//a>}3<399//a>3<400//a>static void /a href="+code=snprint_time" class="sref">snprint_time//a>(char */a href="+code=buf" class="sref">buf//a>, /a href="+code=size_t" class="sref">size_t//a> /a href="+code=bufsiz" class="sref">bufsiz//a>, /a href="+code=s64" class="sref">s64//a> /a href="+code=nr" class="sref">nr//a>)3<401//a>{3<402//a> /a href="+code=s64" class="sref">s64//a> /a href="+code=div" class="sref">div//a>;3<403//a> /a href="+code=s32" class="sref">s32//a> /a href="+code=rem" class="sref">rem//a>;3<404//a>3<405//a> /a href="+code=nr" class="sref">nr//a> += 5; /spa6 class="comment">/* for display rounding *///spa6.3<406//a> /a href="+code=div" class="sref">div//a> = /a href="+code=div_s64_rem" class="sref">div_s64_rem//a>(/a href="+code=nr" class="sref">nr//a>, 1000, &/a href="+code=rem" class="sref">rem//a>);3<407//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=buf" class="sref">buf//a>, /a href="+code=bufsiz" class="sref">bufsiz//a>, /spa6 class="string">"%lld.%02d"div//a>, (int)/a href="+code=rem" class="sref">rem//a>/10);3<408//a>}3<409//a>3<410//a>static void /a href="+code=seq_time" class="sref">seq_time//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, /a href="+code=s64" class="sref">s64//a> /a href="+code=time" class="sref">time//a>)3<411//a>{3<412//a> char /a href="+code=num" class="sref">num//a>[15];3<413//a>3<414//a> /a href="+code=snprint_time" class="sref">snprint_time//a>(/a href="+code=num" class="sref">num//a>, sizeof(/a href="+code=num" class="sref">num//a>), /a href="+code=time" class="sref">time//a>);3<415//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" %14s"num//a>);3<416//a>}3<417//a>3<418//a>static void /a href="+code=seq_lock_time" class="sref">seq_lock_time//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, struct /a href="+code=lock_time" class="sref">lock_time//a> */a href="+code=lt" class="sref">lt//a>)3<419//a>{3<420//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%14lu"lt//a>->/a href="+code=nr" class="sref">nr//a>);3<421//a> /a href="+code=seq_time" class="sref">seq_time//a>(/a href="+code=m" class="sref">m//a>, /a href="+code=lt" class="sref">lt//a>->/a href="+code=min" class="sref">min//a>);3<422//a> /a href="+code=seq_time" class="sref">seq_time//a>(/a href="+code=m" class="sref">m//a>, /a href="+code=lt" class="sref">lt//a>->/a href="+code=max" class="sref">max//a>);3<423//a> /a href="+code=seq_time" class="sref">seq_time//a>(/a href="+code=m" class="sref">m//a>, /a href="+code=lt" class="sref">lt//a>->/a href="+code=total" class="sref">total//a>);3<424//a>}3<425//a>3<426//a>static void /a href="+code=seq_stats" class="sref">seq_stats//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> */a href="+code=data" class="sref">data//a>)3<427//a>{3<428//a> char /a href="+code=name" class="sref">name//a>[39];3<429//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>;3<430//a> struct /a href="+code=lock_class_stats" class="sref">lock_class_stats//a> */a href="+code=stats" class="sref">stats//a>;3<431//a> int /a href="+code=i" class="sref">i//a>, /a href="+code=nam len" class="sref">nam len//a>;3<432//a>3<433//a> /a href="+code=class" class="sref">class//a> = /a href="+code=data" class="sref">data//a>->/a href="+code=class" class="sref">class//a>;3<434//a> /a href="+code=stats" class="sref">stats//a> = &/a href="+code=data" class="sref">data//a>->/a href="+code=stats" class="sref">stats//a>;3<435//a>3<436//a> /a href="+code=nam len" class="sref">nam len//a> = 38;3<437//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=nam _version" class="sref">nam _version//a> > 1)3<438//a> /a href="+code=nam len" class="sref">nam len//a> -= 2; /spa6 class="comment">/* XXX truncates versions > 9 *///spa6.3<439//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=subclass" class="sref">subclass//a>)3<440//a> /a href="+code=nam len" class="sref">nam len//a> -= 2;3<441//a>3<442//a> if (!/a href="+code=class" class="sref">class//a>->/a href="+code=nam " class="sref">name//a>) {3<443//a> char /a href="+code=str" class="sref">str//a>[/a href="+code=KSYM_NAME_LEN" class="sref">KSYM_NAME_LEN//a>];3<444//a> const char */a href="+code=key_nam " class="sref">key_nam //a>;3<445//a>3<446//a> /a href="+code=key_nam " class="sref">key_nam //a> = /a href="+code=__get_key_nam " class="sref">__get_key_nam //a>(/a href="+code=class" class="sref">class//a>->/a href="+code=key" class="sref">key//a>, /a href="+code=str" class="sref">str//a>);3<447//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=nam " class="sref">name//a>, /a href="+code=nam len" class="sref">nam len//a>, /spa6 class="string">"%s"key_nam //a>);3<448//a> } else {3<449//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=nam " class="sref">name//a>, /a href="+code=nam len" class="sref">nam len//a>, /spa6 class="string">"%s"class//a>->/a href="+code=nam " class="sref">name//a>);3<450//a> }3<451//a> /a href="+code=nam len" class="sref">nam len//a> = /a href="+code=strlen" class="sref">strlen//a>(/a href="+code=nam " class="sref">name//a>);3<452//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=nam _version" class="sref">nam _version//a> > 1) {3<453//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=nam " class="sref">name//a>+/a href="+code=nam len" class="sref">nam len//a>, 3, /spa6 class="string">"#%d"class//a>->/a href="+code=nam _version" class="sref">nam _version//a>);3<454//a> /a href="+code=nam len" class="sref">nam len//a> += 2;3<455//a> }3<456//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=subclass" class="sref">subclass//a>) {3<457//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=nam " class="sref">name//a>+/a href="+code=nam len" class="sref">nam len//a>, 3, /spa6 class="string">"/%d"class//a>->/a href="+code=subclass" class="sref">subclass//a>);3<458//a> /a href="+code=nam len" class="sref">nam len//a> += 2;3<459//a> }3<460//a>3<461//a> if (/a href="+code=stats" class="sref">stats//a>->/a href="+code=write_holdtime" class="sref">write_holdtime//a>./a href="+code=nr" class="sref">nr//a>) {3<462//a> if (/a href="+code=stats" class="sref">stats//a>->/a href="+code=read_holdtime" class="sref">read_holdtime//a>./a href="+code=nr" class="sref">nr//a>)3<463//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%38s-W:"name//a>);3<464//a> else3<465//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%40s:"name//a>);3<466//a>3<467//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%14lu "stats//a>->/a href="+code=bounces" class="sref">bounces//a>[/a href="+code=bounce_contended_write" class="sref">bounce_contended_write//a>]);3<468//a> /a href="+code=seq_lock_time" class="sref">seq_lock_time//a>(/a href="+code=m" class="sref">m//a>, &/a href="+code=stats" class="sref">stats//a>->/a href="+code=write_waittime" class="sref">write_waittime//a>);3<469//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" %14lu "stats//a>->/a href="+code=bounces" class="sref">bounces//a>[/a href="+code=bounce_acquired_write" class="sref">bounce_acquired_write//a>]);3<470//a> /a href="+code=seq_lock_time" class="sref">seq_lock_time//a>(/a href="+code=m" class="sref">m//a>, &/a href="+code=stats" class="sref">stats//a>->/a href="+code=write_holdtime" class="sref">write_holdtime//a>);3<471//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<472//a> }3<473//a>3<474//a> if (/a href="+code=stats" class="sref">stats//a>->/a href="+code=read_holdtime" class="sref">read_holdtime//a>./a href="+code=nr" class="sref">nr//a>) {3<475//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%38s-R:"name//a>);3<476//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%14lu "stats//a>->/a href="+code=bounces" class="sref">bounces//a>[/a href="+code=bounce_contended_read" class="sref">bounce_contended_read//a>]);3<477//a> /a href="+code=seq_lock_time" class="sref">seq_lock_time//a>(/a href="+code=m" class="sref">m//a>, &/a href="+code=stats" class="sref">stats//a>->/a href="+code=read_waittime" class="sref">read_waittime//a>);3<478//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">" %14lu "stats//a>->/a href="+code=bounces" class="sref">bounces//a>[/a href="+code=bounce_acquired_read" class="sref">bounce_acquired_read//a>]);3<479//a> /a href="+code=seq_lock_time" class="sref">seq_lock_time//a>(/a href="+code=m" class="sref">m//a>, &/a href="+code=stats" class="sref">stats//a>->/a href="+code=read_holdtime" class="sref">read_holdtime//a>);3<480//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<481//a> }3<482//a>3<483//a> if (/a href="+code=stats" class="sref">stats//a>->/a href="+code=read_waittime" class="sref">read_waittime//a>./a href="+code=nr" class="sref">nr//a> + /a href="+code=stats" class="sref">stats//a>->/a href="+code=write_waittime" class="sref">write_waittime//a>./a href="+code=nr" class="sref">nr//a> == 0)3<484//a> return;3<485//a>3<486//a> if (/a href="+code=stats" class="sref">stats//a>->/a href="+code=read_holdtime" class="sref">read_holdtime//a>./a href="+code=nr" class="sref">nr//a>)3<487//a> /a href="+code=nam len" class="sref">nam len//a> += 2;3<488//a>3<489//a> for (/a href="+code=i" class="sref">i//a> = 0; /a href="+code=i" class="sref">i//a> < /a href="+code=LOCKSTAT_POINTS" class="sref">LOCKSTAT_POINTS//a>; /a href="+code=i" class="sref">i//a>++) {3<490//a> char /a href="+code=ip" class="sref">ip//a>[32];3<491//a>3<492//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=contentio6_point" class="sref">contentio6_point//a>[/a href="+code=i" class="sref">i//a>] == 0)3<493//a> break;3<494//a>3<495//a> if (!/a href="+code=i" class="sref">i//a>)3<496//a> /a href="+code=seq_line" class="sref">seq_line//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">'-'nam len//a>, /a href="+code=nam len" class="sref">nam len//a>);3<497//a>3<498//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=ip" class="sref">ip//a>, sizeof(/a href="+code=ip" class="sref">ip//a>), /spa6 class="string">"[<%p>]"<499//a> (void *)/a href="+code=class" class="sref">class//a>->/a href="+code=contentio6_point" class="sref">contentio6_point//a>[/a href="+code=i" class="sref">i//a>]);3<500//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%40s %14lu %29s %pS\n"<501//a> /a href="+code=nam " class="sref">name//a>, /a href="+code=stats" class="sref">stats//a>->/a href="+code=contentio6_point" class="sref">contentio6_point//a>[/a href="+code=i" class="sref">i//a>],3<502//a> /a href="+code=ip" class="sref">ip//a>, (void *)/a href="+code=class" class="sref">class//a>->/a href="+code=contentio6_point" class="sref">contentio6_point//a>[/a href="+code=i" class="sref">i//a>]);3<503//a> }3<504//a> for (/a href="+code=i" class="sref">i//a> = 0; /a href="+code=i" class="sref">i//a> < /a href="+code=LOCKSTAT_POINTS" class="sref">LOCKSTAT_POINTS//a>; /a href="+code=i" class="sref">i//a>++) {3<505//a> char /a href="+code=ip" class="sref">ip//a>[32];3<506//a>3<507//a> if (/a href="+code=class" class="sref">class//a>->/a href="+code=contending_point" class="sref">contending_point//a>[/a href="+code=i" class="sref">i//a>] == 0)3<508//a> break;3<509//a>3<510//a> if (!/a href="+code=i" class="sref">i//a>)3<511//a> /a href="+code=seq_line" class="sref">seq_line//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">'-'nam len//a>, /a href="+code=nam len" class="sref">nam len//a>);3<512//a>3<513//a> /a href="+code=snprintf" class="sref">snprintf//a>(/a href="+code=ip" class="sref">ip//a>, sizeof(/a href="+code=ip" class="sref">ip//a>), /spa6 class="string">"[<%p>]"<514//a> (void *)/a href="+code=class" class="sref">class//a>->/a href="+code=contending_point" class="sref">contending_point//a>[/a href="+code=i" class="sref">i//a>]);3<515//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%40s %14lu %29s %pS\n"<516//a> /a href="+code=nam " class="sref">name//a>, /a href="+code=stats" class="sref">stats//a>->/a href="+code=contending_point" class="sref">contending_point//a>[/a href="+code=i" class="sref">i//a>],3<517//a> /a href="+code=ip" class="sref">ip//a>, (void *)/a href="+code=class" class="sref">class//a>->/a href="+code=contending_point" class="sref">contending_point//a>[/a href="+code=i" class="sref">i//a>]);3<518//a> }3<519//a> if (/a href="+code=i" class="sref">i//a>) {3<520//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<521//a> /a href="+code=seq_line" class="sref">seq_line//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">'.'<522//a> /a href="+code=seq_puts" class="sref">seq_puts//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<523//a> }3<524//a>}3<525//a>3<526//a>static void /a href="+code=seq_header" class="sref">seq_header//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>)3<527//a>{3<528//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"lock_stat version 0.3\n"<529//a>3<530//a> if (/a href="+code=unlikely" class="sref">unlikely//a>(!/a href="+code=debug_locks" class="sref">debug_locks//a>))3<531//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"*WARNING* lock debugging disabled!! - possibly due to a lockdep warning\n"<532//a>3<533//a> /a href="+code=seq_line" class="sref">seq_line//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">'-'<534//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"%40s %14s %14s %14s %14s %14s %14s %14s %14s "<535//a> /spa6 class="string">"%14s %14s\n"<536//a> /spa6 class="string">"class nam "<537//a> /spa6 class="string">"con-bounces"<538//a> /spa6 class="string">"contentio6s"<539//a> /spa6 class="string">"waittime-min"<540//a> /spa6 class="string">"waittime-max"<541//a> /spa6 class="string">"waittime-total"<542//a> /spa6 class="string">"acq-bounces"<543//a> /spa6 class="string">"acquisitio6s"<544//a> /spa6 class="string">"holdtime-min"<545//a> /spa6 class="string">"holdtime-max"<546//a> /spa6 class="string">"holdtime-total"<547//a> /a href="+code=seq_line" class="sref">seq_line//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">'-'<548//a> /a href="+code=seq_printf" class="sref">seq_printf//a>(/a href="+code=m" class="sref">m//a>, /spa6 class="string">"\n"<549//a>}3<550//a>3<551//a>static void */a href="+code=ls_start" class="sref">ls_start//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=pos" class="sref">pos//a>)3<552//a>{3<553//a> struct /a href="+code=lock_stat_seq" class="sref">lock_stat_seq//a> */a href="+code=data" class="sref">data//a> = /a href="+code=m" class="sref">m//a>->/a href="+code=private" class="sref">private//a>;3<554//a> struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> */a href="+code=iter" class="sref">iter//a>;3<555//a>3<556//a> if (*/a href="+code=pos" class="sref">pos//a> == 0)3<557//a> return /a href="+code=SEQ_START_TOKEN" class="sref">SEQ_START_TOKEN//a>;3<558//a>3<559//a> /a href="+code=iter" class="sref">iter//a> = /a href="+code=data" class="sref">data//a>->/a href="+code=stats" class="sref">stats//a> + (*/a href="+code=pos" class="sref">pos//a> - 1);3<560//a> if (/a href="+code=iter" class="sref">iter//a> >= /a href="+code=data" class="sref">data//a>->/a href="+code=iter_end" class="sref">iter_end//a>)3<561//a> /a href="+code=iter" class="sref">iter//a> = /a href="+code=NULL" class="sref">NULL//a>;3<562//a>3<563//a> return /a href="+code=iter" class="sref">iter//a>;3<564//a>}3<565//a>3<566//a>static void */a href="+code=ls_next" class="sref">ls_next//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=pos" class="sref">pos//a>)3<567//a>{3<568//a> (*/a href="+code=pos" class="sref">pos//a>)++;3<569//a> return /a href="+code=ls_start" class="sref">ls_start//a>(/a href="+code=m" class="sref">m//a>, /a href="+code=pos" class="sref">pos//a>);3<570//a>}3<571//a>3<572//a>static void /a href="+code=ls_stop" class="sref">ls_stop//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3<573//a>{3<574//a>}3<575//a>3<576//a>static int /a href="+code=ls_show" class="sref">ls_show//a>(struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a>, void */a href="+code=v" class="sref">v//a>)3<577//a>{3<578//a> if (/a href="+code=v" class="sref">v//a> == /a href="+code=SEQ_START_TOKEN" class="sref">SEQ_START_TOKEN//a>)3<579//a> /a href="+code=seq_header" class="sref">seq_header//a>(/a href="+code=m" class="sref">m//a>);3<580//a> else3<581//a> /a href="+code=seq_stats" class="sref">seq_stats//a>(/a href="+code=m" class="sref">m//a>, /a href="+code=v" class="sref">v//a>);3<582//a>3<583//a> return 0;3<584//a>}3<585//a>3<586//a>static const struct /a href="+code=seq_operatio6s" class="sref">seq_operatio6s//a> /a href="+code=lockstat_ops" class="sref">lockstat_ops//a> = {3<587//a> ./a href="+code=start" class="sref">start//a> = /a href="+code=ls_start" class="sref">ls_start//a>,3<588//a> ./a href="+code=next" class="sref">next//a> = /a href="+code=ls_next" class="sref">ls_next//a>,3<589//a> ./a href="+code=stop" class="sref">stop//a> = /a href="+code=ls_stop" class="sref">ls_stop//a>,3<590//a> ./a href="+code=show" class="sref">show//a> = /a href="+code=ls_show" class="sref">ls_show//a>,3<591//a>};3<592//a>3<593//a>static int /a href="+code=lock_stat_open" class="sref">lock_stat_open//a>(struct /a href="+code=inode" class="sref">inode//a> */a href="+code=inode" class="sref">inode//a>, struct /a href="+code=file" class="sref">file//a> */a href="+code=file" class="sref">file//a>)3<594//a>{3<595//a> int /a href="+code=res" class="sref">res//a>;3<596//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>;3<597//a> struct /a href="+code=lock_stat_seq" class="sref">lock_stat_seq//a> */a href="+code=data" class="sref">data//a> = /a href="+code=vmalloc" class="sref">vmalloc//a>(sizeof(struct /a href="+code=lock_stat_seq" class="sref">lock_stat_seq//a>));3<598//a>3<599//a> if (!/a href="+code=data" class="sref">data//a>)3<600//a> return -/a href="+code=ENOMEM" class="sref">ENOMEM//a>;3<601//a>3<602//a> /a href="+code=res" class="sref">res//a> = /a href="+code=seq_open" class="sref">seq_open//a>(/a href="+code=file" class="sref">file//a>, &/a href="+code=lockstat_ops" class="sref">lockstat_ops//a>);3<603//a> if (!/a href="+code=res" class="sref">res//a>) {3<604//a> struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a> */a href="+code=iter" class="sref">iter//a> = /a href="+code=data" class="sref">data//a>->/a href="+code=stats" class="sref">stats//a>;3<605//a> struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=m" class="sref">m//a> = /a href="+code=file" class="sref">file//a>->/a href="+code=private_data" class="sref">private_data//a>;3<606//a>3<607//a> /a href="+code=list_for_each_entry" class="sref">list_for_each_entry//a>(/a href="+code=class" class="sref">class//a>, &/a href="+code=all_lock_classes" class="sref">all_lock_classes//a>, /a href="+code=lock_entry" class="sref">lock_entry//a>) {3<608//a> /a href="+code=iter" class="sref">iter//a>->/a href="+code=class" class="sref">class//a> = /a href="+code=class" class="sref">class//a>;3<609//a> /a href="+code=iter" class="sref">iter//a>->/a href="+code=stats" class="sref">stats//a> = /a href="+code=lock_stats" class="sref">lock_stats//a>(/a href="+code=class" class="sref">class//a>);3<610//a> /a href="+code=iter" class="sref">iter//a>++;3<611//a> }3<612//a> /a href="+code=data" class="sref">data//a>->/a href="+code=iter_end" class="sref">iter_end//a> = /a href="+code=iter" class="sref">iter//a>;3<613//a>3<614//a> /a href="+code=sort" class="sref">sort//a>(/a href="+code=data" class="sref">data//a>->/a href="+code=stats" class="sref">stats//a>, /a href="+code=data" class="sref">data//a>->/a href="+code=iter_end" class="sref">iter_end//a> - /a href="+code=data" class="sref">data//a>->/a href="+code=stats" class="sref">stats//a>,3<615//a> sizeof(struct /a href="+code=lock_stat_data" class="sref">lock_stat_data//a>),3<616//a> /a href="+code=lock_stat_cmp" class="sref">lock_stat_cmp//a>, /a href="+code=NULL" class="sref">NULL//a>);3<617//a>3<618//a> /a href="+code=m" class="sref">m//a>->/a href="+code=private" class="sref">private//a> = /a href="+code=data" class="sref">data//a>;3<619//a> } else3<620//a> /a href="+code=vfree" class="sref">vfree//a>(/a href="+code=data" class="sref">data//a>);3<621//a>3<622//a> return /a href="+code=res" class="sref">res//a>;3<623//a>}3<624//a>3<625//a>static /a href="+code=ssize_t" class="sref">ssize_t//a> /a href="+code=lock_stat_write" class="sref">lock_stat_write//a>(struct /a href="+code=file" class="sref">file//a> */a href="+code=file" class="sref">file//a>, const char /a href="+code=__user" class="sref">__user//a> */a href="+code=buf" class="sref">buf//a>,3<626//a> /a href="+code=size_t" class="sref">size_t//a> /a href="+code=count" class="sref">count//a>, /a href="+code=loff_t" class="sref">loff_t//a> */a href="+code=ppos" class="sref">ppos//a>)3<627//a>{3<628//a> struct /a href="+code=lock_class" class="sref">lock_class//a> */a href="+code=class" class="sref">class//a>;3<629//a> char /a href="+code=c" class="sref">c//a>;3<630//a>3<631//a> if (/a href="+code=count" class="sref">count//a>) {3<632//a> if (/a href="+code=get_user" class="sref">get_user//a>(/a href="+code=c" class="sref">c//a>, /a href="+code=buf" class="sref">buf//a>))3<633//a> return -/a href="+code=EFAULT" class="sref">EFAULT//a>;3<634//a>3<635//a> if (/a href="+code=c" class="sref">c//a> != /spa6 class="string">'0'<636//a> return /a href="+code=count" class="sref">count//a>;3<637//a>3<638//a> /a href="+code=list_for_each_entry" class="sref">list_for_each_entry//a>(/a href="+code=class" class="sref">class//a>, &/a href="+code=all_lock_classes" class="sref">all_lock_classes//a>, /a href="+code=lock_entry" class="sref">lock_entry//a>)3<639//a> /a href="+code=clear_lock_stats" class="sref">clear_lock_stats//a>(/a href="+code=class" class="sref">class//a>);3<640//a> }3<641//a> return /a href="+code=count" class="sref">count//a>;3<642//a>}3<643//a>3<644//a>static int /a href="+code=lock_stat_release" class="sref">lock_stat_release//a>(struct /a href="+code=inode" class="sref">inode//a> */a href="+code=inode" class="sref">inode//a>, struct /a href="+code=file" class="sref">file//a> */a href="+code=file" class="sref">file//a>)3<645//a>{3<646//a> struct /a href="+code=seq_file" class="sref">seq_file//a> */a href="+code=seq" class="sref">seq//a> = /a href="+code=file" class="sref">file//a>->/a href="+code=private_data" class="sref">private_data//a>;3<647//a>3<648//a> /a href="+code=vfree" class="sref">vfree//a>(/a href="+code=seq" class="sref">seq//a>->/a href="+code=private" class="sref">private//a>);3<649//a> return /a href="+code=seq_release" class="sref">seq_release//a>(/a href="+code=inode" class="sref">inode//a>, /a href="+code=file" class="sref">file//a>);3<650//a>}3<651//a>3<652//a>static const struct /a href="+code=file_operatio6s" class="sref">file_operatio6s//a> /a href="+code=proc_lock_stat_operatio6s" class="sref">proc_lock_stat_operatio6s//a> = {3<653//a> ./a href="+code=open" class="sref">open//a> = /a href="+code=lock_stat_open" class="sref">lock_stat_open//a>,3<654//a> ./a href="+code=write" class="sref">write//a> = /a href="+code=lock_stat_write" class="sref">lock_stat_write//a>,3<655//a> ./a href="+code=read" class="sref">read//a> = /a href="+code=seq_read" class="sref">seq_read//a>,3<656//a> ./a href="+code=llseek" class="sref">llseek//a> = /a href="+code=seq_lseek" class="sref">seq_lseek//a>,3<657//a> ./a href="+code=release" class="sref">release//a> = /a href="+code=lock_stat_release" class="sref">lock_stat_release//a>,3<658//a>};3<659//a>#endif /spa6 class="comment">/* CONFIG_LOCK_STAT */<660//a>3<661//a>static int /a href="+code=__init" class="sref">__init//a> /a href="+code=lockdep_proc_init" class="sref">lockdep_proc_init//a>(void)3<662//a>{3<663//a> /a href="+code=proc_create" class="sref">proc_create//a>(/spa6 class="string">"lockdep"S_IRUSR//a>, /a href="+code=NULL" class="sref">NULL//a>, &/a href="+code=proc_lockdep_operatio6s" class="sref">proc_lockdep_operatio6s//a>);3<664//a>#ifdef /a href="+code=CONFIG_PROVE_LOCKING" class="sref">CONFIG_PROVE_LOCKING//a>3<665//a> /a href="+code=proc_create" class="sref">proc_create//a>(/spa6 class="string">"lockdep_chai6s"S_IRUSR//a>, /a href="+code=NULL" class="sref">NULL//a>,3<666//a> &/a href="+code=proc_lockdep_chai6s_operatio6s" class="sref">proc_lockdep_chai6s_operatio6s//a>);3<667//a>#endif3<668//a> /a href="+code=proc_create" class="sref">proc_create//a>(/spa6 class="string">"lockdep_stats"S_IRUSR//a>, /a href="+code=NULL" class="sref">NULL//a>,3<669//a> &/a href="+code=proc_lockdep_stats_operatio6s" class="sref">proc_lockdep_stats_operatio6s//a>);3<670//a>3<671//a>#ifdef /a href="+code=CONFIG_LOCK_STAT" class="sref">CONFIG_LOCK_STAT//a>3<672//a> /a href="+code=proc_create" class="sref">proc_create//a>(/spa6 class="string">"lock_stat"S_IRUSR//a> | /a href="+code=S_IWUSR" class="sref">S_IWUSR//a>, /a href="+code=NULL" class="sref">NULL//a>,3<673//a> &/a href="+code=proc_lock_stat_operatio6s" class="sref">proc_lock_stat_operatio6s//a>);3<674//a>#endif3<675//a>3<676//a> return 0;3<677//a>}3<678//a>3<679//a>/a href="+code=__initcall" class="sref">__initcall//a>(/a href="+code=lockdep_proc_init" class="sref">lockdep_proc_init//a>);3<680//a>3<681//a>
lxr.linux.no kindly hosted by Redpill Linpro AS//a>, provider of Linux consulting and operatio6s services since 1995.