#help_index "Debugging/Profiler;Profiler;Cmd Line (Typically)/Profiler" #help_file "::/Doc/Profiler" #define PF_ARRAY_CNT 0x100000 I64 pf_jiffy_start,pf_jiffy_end; I64 *pf_array=NULL; I64 pf_cpu=0; I64 pf_buf_in_ptr=0,pf_depth; I64 pf_prof_active=0; U0 ProfTimerInt(CTask *task) {//See $LK,"profiler_timer_irq",A="FF:::/Kernel/KInts.HC,profiler_timer_irq"$. I64 i,k; if (Bt(&pf_prof_active,0)) for (k=0;k<=pf_depth;k++) { if (task==Gs->idle_task) i=SYS_IDLE_PT; else i=TaskCaller(task,k,TRUE); if (pf_buf_in_ptr=filter_cnt) "$$GREEN$$%6.2f%08X:%s\n$$FG$$",100*routine_total/total_time, routine_total,last_buf; StrCpy(last_buf,buf2); routine_total=0; } routine_total+=hits; if (hits>=filter_cnt) { "%6.2f%08X:%P\n",100*hits/total_time,hits,rip; last_rip=rip; } } if (*last_buf && routine_total>=filter_cnt) "$$GREEN$$%6.2f%08X:%s\n$$FG$$",100*routine_total/total_time, routine_total,last_buf; "Total Time:%0.6fs\n",total_time/JIFFY_FREQ; if (leave_it) { cpu_structs[pf_cpu].profiler_timer_irq=&ProfTimerInt; LBts(&pf_prof_active,0); } else cpu_structs[pf_cpu].profiler_timer_irq=NULL; } }