Lines Matching refs:profile

129 	spin_lock_init(&device->profile.lock);  in dasd_alloc_device()
167 spin_lock_init(&block->profile.lock); in dasd_alloc_block()
262 dasd_profile_init(&block->profile, block->debugfs_dentry); in dasd_state_known_to_basic()
264 dasd_profile_on(&device->block->profile); in dasd_state_known_to_basic()
269 dasd_profile_init(&device->profile, device->debugfs_dentry); in dasd_state_known_to_basic()
297 dasd_profile_exit(&device->block->profile); in dasd_state_basic_to_known()
306 dasd_profile_exit(&device->profile); in dasd_state_basic_to_known()
700 if (dasd_global_profile_level || block->profile.data) in dasd_profile_start()
713 spin_lock(&block->profile.lock); in dasd_profile_start()
714 if (block->profile.data) { in dasd_profile_start()
715 block->profile.data->dasd_io_nr_req[counter]++; in dasd_profile_start()
717 block->profile.data->dasd_read_nr_req[counter]++; in dasd_profile_start()
719 spin_unlock(&block->profile.lock); in dasd_profile_start()
727 if (device->profile.data) { in dasd_profile_start()
733 spin_lock(&device->profile.lock); in dasd_profile_start()
734 if (device->profile.data) { in dasd_profile_start()
735 device->profile.data->dasd_io_nr_req[counter]++; in dasd_profile_start()
737 device->profile.data->dasd_read_nr_req[counter]++; in dasd_profile_start()
739 spin_unlock(&device->profile.lock); in dasd_profile_start()
812 block->profile.data || in dasd_profile_end()
813 device->profile.data)) in dasd_profile_end()
849 spin_lock(&block->profile.lock); in dasd_profile_end()
850 if (block->profile.data) in dasd_profile_end()
851 dasd_profile_end_add_data(block->profile.data, in dasd_profile_end()
859 spin_unlock(&block->profile.lock); in dasd_profile_end()
861 spin_lock(&device->profile.lock); in dasd_profile_end()
862 if (device->profile.data) in dasd_profile_end()
863 dasd_profile_end_add_data(device->profile.data, in dasd_profile_end()
871 spin_unlock(&device->profile.lock); in dasd_profile_end()
874 void dasd_profile_reset(struct dasd_profile *profile) in dasd_profile_reset() argument
878 spin_lock_bh(&profile->lock); in dasd_profile_reset()
879 data = profile->data; in dasd_profile_reset()
881 spin_unlock_bh(&profile->lock); in dasd_profile_reset()
886 spin_unlock_bh(&profile->lock); in dasd_profile_reset()
889 int dasd_profile_on(struct dasd_profile *profile) in dasd_profile_on() argument
896 spin_lock_bh(&profile->lock); in dasd_profile_on()
897 if (profile->data) { in dasd_profile_on()
898 spin_unlock_bh(&profile->lock); in dasd_profile_on()
903 profile->data = data; in dasd_profile_on()
904 spin_unlock_bh(&profile->lock); in dasd_profile_on()
908 void dasd_profile_off(struct dasd_profile *profile) in dasd_profile_off() argument
910 spin_lock_bh(&profile->lock); in dasd_profile_off()
911 kfree(profile->data); in dasd_profile_off()
912 profile->data = NULL; in dasd_profile_off()
913 spin_unlock_bh(&profile->lock); in dasd_profile_off()
1028 struct dasd_profile *profile; in dasd_stats_show() local
1031 profile = m->private; in dasd_stats_show()
1032 spin_lock_bh(&profile->lock); in dasd_stats_show()
1033 data = profile->data; in dasd_stats_show()
1035 spin_unlock_bh(&profile->lock); in dasd_stats_show()
1040 spin_unlock_bh(&profile->lock); in dasd_stats_show()
1046 struct dasd_profile *profile = inode->i_private; in dasd_stats_open() local
1047 return single_open(file, dasd_stats_show, profile); in dasd_stats_open()
1059 static void dasd_profile_init(struct dasd_profile *profile, in dasd_profile_init() argument
1067 profile->dentry = NULL; in dasd_profile_init()
1068 profile->data = NULL; in dasd_profile_init()
1071 profile, &dasd_stats_raw_fops); in dasd_profile_init()
1073 profile->dentry = pde; in dasd_profile_init()
1077 static void dasd_profile_exit(struct dasd_profile *profile) in dasd_profile_exit() argument
1079 dasd_profile_off(profile); in dasd_profile_exit()
1080 debugfs_remove(profile->dentry); in dasd_profile_exit()
1081 profile->dentry = NULL; in dasd_profile_exit()
1135 static void dasd_profile_init(struct dasd_profile *profile, in dasd_profile_init() argument
1141 static void dasd_profile_exit(struct dasd_profile *profile) in dasd_profile_exit() argument
1146 int dasd_profile_on(struct dasd_profile *profile) in dasd_profile_on() argument