⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 monitor.3

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 3
字号:
.TH MONITOR 3 .SH NAMEmonitor \- prepare execution profile.SH SYNOPSIS.B monitor(lowpc, highpc, buffer, bufsize, nfunc).br.Bint (*lowpc)( ), (*highpc)( );.br.B short buffer[ ];.SH DESCRIPTIONAn executable program created by`cc \-p' automatically includes calls for.I monitorwith default parameters;.I monitorneedn't be called explicitlyexcept to gain fine control over profiling..PP.I Monitoris an interface to.IR profil (2)..I Lowpcand.I highpcare the addresses of two functions;.I bufferis the address of a (user supplied)array of.I bufsizeshort integers..I Monitorarranges to record a histogram ofperiodically sampled values of the program counter,and of counts of callsof certain functions, in the buffer.The lowest address sampledis that of.I lowpcand the highest isjust below.IR highpc .At most.I nfunccall counts can be kept; only calls of functionscompiled with the profiling option.B \-pof.IR cc (1)are recorded.For the results to be significant,especially where there are small, heavilyused routines,it is suggested that the buffer be no morethan a few times smaller than the rangeof locations sampled..PPTo profile the entire program,it is sufficient to use.PP	extern etext();.br	....br	monitor((int)2, etext, buf, bufsize, nfunc);.PP.I Etextlies just above all theprogram text, see.IR end (3)..PPTo stop execution monitoring and write the resultson the file.I mon.out,use.PP	monitor(0);.LPthen.IR prof (1)can be usedto examine the results..SH FILESmon.out.SH "SEE ALSO"prof(1), profil(2), cc(1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -