From: Vinod H. <vin...@gm...> - 2008-04-09 08:15:04
|
Hi, I am trying to get the info about the hardware event counter values, process resource attributes like the memory usage, priority, etc. I am having an application which invokes oprofile in a loop as follows. main() {........ char array[210000]; //for storing info from opreport.. while( number_of_iterations > 0 ) { system("opcontrol --reset"); system("opcontrol --init"); system("opcontrol --no-vmlinux"); system("opcontrol --event=DCACHE_MISS:100000"); system("opcontrol --separate=lib"); system("opcontrol --start"); collect_process_info(); // collect various info abt a given process. log_process_info(); // write the info to an array udelay(100000); system("opcontrol --stop"); system("opreport > /home/user/oprfiles_report"); copy_oprofiles_report( ); // copy oprofiles report to an array } log_arrays_to_files(); // final one time writing onto the files } // end main I tried to observe browser process ( running the youtube). The device both the programs terribly slowly( like though i have given delay of 1 second, it will take 6-7 seconds to complete an iteration) and after few iterations, the program runs the iterations at the rate of 30 seconds...!! The device is N810. I even tried using fread and fwrite instead of using the array but still i find the same problem. what could be the bottlenecks here... is there any other way to use oprofile for profiling hardware counter activity... Thanks for any advice in this regard.... |