00001 #include "rres_config.h" 00002 #include "qos_prof.h" 00003 00010 /* QOS_PROFILE may be disabled in this module, but defined in another 00011 * module that uses qos_prof.h, thus we always need these symbols 00012 * otherwise we get unresolved symbol when loading the module with 00013 * QOS_PROFILE enabled 00014 */ 00015 00016 qos_profile_t qos_prof_data[QOS_PROF_MAX_COUNTS]; 00017 int qos_prof_num = 0; 00018 00019 #if defined(QOS_KS) 00020 EXPORT_SYMBOL_GPL(qos_prof_num); 00021 EXPORT_SYMBOL_GPL(qos_prof_data); 00022 #endif 00023 00024 #ifdef QOS_PROFILE 00025 00026 void prof_dump() { 00027 int i; 00028 debug_print(DBG_DEV "<PROF> [prof_dump] BEGIN: %d entries\n", qos_prof_num); 00029 for (i=0; i<qos_prof_num; i++) { 00030 debug_print(DBG_DEV \ 00031 "<PROF> %20s: %5lu %9llu\n", 00032 qos_prof_data[i].func_name, 00033 qos_prof_data[i].counter, 00034 qos_prof_data[i].time); 00035 } 00036 debug_print(DBG_DEV "<PROF> [prof_dump] END\n"); 00037 } 00038 00039 #endif