Lines Matching refs:profile

127 	spin_lock_init(&device->profile.lock);  in dasd_alloc_device()
165 spin_lock_init(&block->profile.lock); in dasd_alloc_block()
260 dasd_profile_init(&block->profile, block->debugfs_dentry); in dasd_state_known_to_basic()
262 dasd_profile_on(&device->block->profile); in dasd_state_known_to_basic()
267 dasd_profile_init(&device->profile, device->debugfs_dentry); in dasd_state_known_to_basic()
295 dasd_profile_exit(&device->block->profile); in dasd_state_basic_to_known()
304 dasd_profile_exit(&device->profile); in dasd_state_basic_to_known()
698 if (dasd_global_profile_level || block->profile.data) in dasd_profile_start()
711 spin_lock(&block->profile.lock); in dasd_profile_start()
712 if (block->profile.data) { in dasd_profile_start()
713 block->profile.data->dasd_io_nr_req[counter]++; in dasd_profile_start()
715 block->profile.data->dasd_read_nr_req[counter]++; in dasd_profile_start()
717 spin_unlock(&block->profile.lock); in dasd_profile_start()
725 if (device->profile.data) { in dasd_profile_start()
731 spin_lock(&device->profile.lock); in dasd_profile_start()
732 if (device->profile.data) { in dasd_profile_start()
733 device->profile.data->dasd_io_nr_req[counter]++; in dasd_profile_start()
735 device->profile.data->dasd_read_nr_req[counter]++; in dasd_profile_start()
737 spin_unlock(&device->profile.lock); in dasd_profile_start()
810 block->profile.data || in dasd_profile_end()
811 device->profile.data)) in dasd_profile_end()
847 spin_lock(&block->profile.lock); in dasd_profile_end()
848 if (block->profile.data) in dasd_profile_end()
849 dasd_profile_end_add_data(block->profile.data, in dasd_profile_end()
857 spin_unlock(&block->profile.lock); in dasd_profile_end()
859 spin_lock(&device->profile.lock); in dasd_profile_end()
860 if (device->profile.data) in dasd_profile_end()
861 dasd_profile_end_add_data(device->profile.data, in dasd_profile_end()
869 spin_unlock(&device->profile.lock); in dasd_profile_end()
872 void dasd_profile_reset(struct dasd_profile *profile) in dasd_profile_reset() argument
876 spin_lock_bh(&profile->lock); in dasd_profile_reset()
877 data = profile->data; in dasd_profile_reset()
879 spin_unlock_bh(&profile->lock); in dasd_profile_reset()
884 spin_unlock_bh(&profile->lock); in dasd_profile_reset()
887 int dasd_profile_on(struct dasd_profile *profile) in dasd_profile_on() argument
894 spin_lock_bh(&profile->lock); in dasd_profile_on()
895 if (profile->data) { in dasd_profile_on()
896 spin_unlock_bh(&profile->lock); in dasd_profile_on()
901 profile->data = data; in dasd_profile_on()
902 spin_unlock_bh(&profile->lock); in dasd_profile_on()
906 void dasd_profile_off(struct dasd_profile *profile) in dasd_profile_off() argument
908 spin_lock_bh(&profile->lock); in dasd_profile_off()
909 kfree(profile->data); in dasd_profile_off()
910 profile->data = NULL; in dasd_profile_off()
911 spin_unlock_bh(&profile->lock); in dasd_profile_off()
1026 struct dasd_profile *profile; in dasd_stats_show() local
1029 profile = m->private; in dasd_stats_show()
1030 spin_lock_bh(&profile->lock); in dasd_stats_show()
1031 data = profile->data; in dasd_stats_show()
1033 spin_unlock_bh(&profile->lock); in dasd_stats_show()
1038 spin_unlock_bh(&profile->lock); in dasd_stats_show()
1044 struct dasd_profile *profile = inode->i_private; in dasd_stats_open() local
1045 return single_open(file, dasd_stats_show, profile); in dasd_stats_open()
1057 static void dasd_profile_init(struct dasd_profile *profile, in dasd_profile_init() argument
1065 profile->dentry = NULL; in dasd_profile_init()
1066 profile->data = NULL; in dasd_profile_init()
1069 profile, &dasd_stats_raw_fops); in dasd_profile_init()
1071 profile->dentry = pde; in dasd_profile_init()
1075 static void dasd_profile_exit(struct dasd_profile *profile) in dasd_profile_exit() argument
1077 dasd_profile_off(profile); in dasd_profile_exit()
1078 debugfs_remove(profile->dentry); in dasd_profile_exit()
1079 profile->dentry = NULL; in dasd_profile_exit()
1133 static void dasd_profile_init(struct dasd_profile *profile, in dasd_profile_init() argument
1139 static void dasd_profile_exit(struct dasd_profile *profile) in dasd_profile_exit() argument
1144 int dasd_profile_on(struct dasd_profile *profile) in dasd_profile_on() argument