Lines Matching refs:profile
144 spin_lock_init(&device->profile.lock); in dasd_alloc_device()
181 spin_lock_init(&block->profile.lock); in dasd_alloc_block()
266 dasd_profile_init(&block->profile, block->debugfs_dentry); in dasd_state_known_to_basic()
268 dasd_profile_on(&device->block->profile); in dasd_state_known_to_basic()
273 dasd_profile_init(&device->profile, device->debugfs_dentry); in dasd_state_known_to_basic()
302 dasd_profile_exit(&device->block->profile); in dasd_state_basic_to_known()
311 dasd_profile_exit(&device->profile); in dasd_state_basic_to_known()
673 if (dasd_global_profile_level || block->profile.data) in dasd_profile_start()
686 spin_lock(&block->profile.lock); in dasd_profile_start()
687 if (block->profile.data) { in dasd_profile_start()
688 block->profile.data->dasd_io_nr_req[counter]++; in dasd_profile_start()
690 block->profile.data->dasd_read_nr_req[counter]++; in dasd_profile_start()
692 spin_unlock(&block->profile.lock); in dasd_profile_start()
700 if (!device->profile.data) in dasd_profile_start()
710 spin_lock(&device->profile.lock); in dasd_profile_start()
711 device->profile.data->dasd_io_nr_req[counter]++; in dasd_profile_start()
713 device->profile.data->dasd_read_nr_req[counter]++; in dasd_profile_start()
714 spin_unlock(&device->profile.lock); in dasd_profile_start()
788 block->profile.data || in dasd_profile_end()
789 device->profile.data)) in dasd_profile_end()
830 spin_lock(&block->profile.lock); in dasd_profile_end()
831 if (block->profile.data) { in dasd_profile_end()
832 data = block->profile.data; in dasd_profile_end()
837 dasd_profile_end_add_data(block->profile.data, in dasd_profile_end()
846 spin_unlock(&block->profile.lock); in dasd_profile_end()
848 spin_lock(&device->profile.lock); in dasd_profile_end()
849 if (device->profile.data) { in dasd_profile_end()
850 data = device->profile.data; in dasd_profile_end()
855 dasd_profile_end_add_data(device->profile.data, in dasd_profile_end()
864 spin_unlock(&device->profile.lock); in dasd_profile_end()
867 void dasd_profile_reset(struct dasd_profile *profile) in dasd_profile_reset() argument
871 spin_lock_bh(&profile->lock); in dasd_profile_reset()
872 data = profile->data; in dasd_profile_reset()
874 spin_unlock_bh(&profile->lock); in dasd_profile_reset()
879 spin_unlock_bh(&profile->lock); in dasd_profile_reset()
882 int dasd_profile_on(struct dasd_profile *profile) in dasd_profile_on() argument
889 spin_lock_bh(&profile->lock); in dasd_profile_on()
890 if (profile->data) { in dasd_profile_on()
891 spin_unlock_bh(&profile->lock); in dasd_profile_on()
896 profile->data = data; in dasd_profile_on()
897 spin_unlock_bh(&profile->lock); in dasd_profile_on()
901 void dasd_profile_off(struct dasd_profile *profile) in dasd_profile_off() argument
903 spin_lock_bh(&profile->lock); in dasd_profile_off()
904 kfree(profile->data); in dasd_profile_off()
905 profile->data = NULL; in dasd_profile_off()
906 spin_unlock_bh(&profile->lock); in dasd_profile_off()
1029 struct dasd_profile *profile; in dasd_stats_show() local
1032 profile = m->private; in dasd_stats_show()
1033 spin_lock_bh(&profile->lock); in dasd_stats_show()
1034 data = profile->data; in dasd_stats_show()
1036 spin_unlock_bh(&profile->lock); in dasd_stats_show()
1041 spin_unlock_bh(&profile->lock); in dasd_stats_show()
1047 struct dasd_profile *profile = inode->i_private; in dasd_stats_open() local
1048 return single_open(file, dasd_stats_show, profile); in dasd_stats_open()
1060 static void dasd_profile_init(struct dasd_profile *profile, in dasd_profile_init() argument
1068 profile->dentry = NULL; in dasd_profile_init()
1069 profile->data = NULL; in dasd_profile_init()
1072 profile, &dasd_stats_raw_fops); in dasd_profile_init()
1074 profile->dentry = pde; in dasd_profile_init()
1078 static void dasd_profile_exit(struct dasd_profile *profile) in dasd_profile_exit() argument
1080 dasd_profile_off(profile); in dasd_profile_exit()
1081 debugfs_remove(profile->dentry); in dasd_profile_exit()
1082 profile->dentry = NULL; in dasd_profile_exit()
1136 static void dasd_profile_init(struct dasd_profile *profile, in dasd_profile_init() argument
1142 static void dasd_profile_exit(struct dasd_profile *profile) in dasd_profile_exit() argument
1147 int dasd_profile_on(struct dasd_profile *profile) in dasd_profile_on() argument