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

📄 readprofile.1

📁 Util-linux 软件包包含许多工具。其中比较重要的是加载、卸载、格式化、分区和管理硬盘驱动器
💻 1
字号:
.TH READPROFILE 1 "May 1996".UC 4.SH NAMEreadprofile - a tool to read kernel profiling information.SH SYNOPSIS.B readprofile[.I options].SH VERSIONThis manpage documents version 2.0 of the program..SH DESCRIPTION.LPThe.B readprofilecommand uses the .B /proc/profileinformation to print ascii data on standard output.The output isorganized in three columns: the first is the number of clock ticks,the second is the name of the C function in the kernel where those manyticks occurred, and the third is the normalized `load' of the procedure,calculated as a ratio between the number of ticks and the length ofthe procedure. The output is filled with blanks to ease readability..LPAvailable command line options are the following:.TP.RB -m " mapfile"Specify a mapfile, which by default is.B /usr/src/linux/System.map.You should specify the map file on cmdline if your current kernel isn't thelast one you compiled, or if you keep System.map elsewhere. If the name ofthe map file ends with `.gz' it is decompressed on the fly..TP.RB -p " pro-file"Specify a different profiling buffer, which by default is.B /proc/profile.Using a different pro-file is useful if you want to `freeze' thekernel profiling at some time and read it later. The.B /proc/profilefile can be copied using `cat' or `cp'. There is no more support forcompressed profile buffers, like in .B readprofile-1.1,because the program needs to know the size of the buffer in advance..TP.B -iInfo. This makes .B readprofileonly print the profiling step used by the kernel.The profiling step is the resolution of the profiling buffer, andis chosen during kernel configuration (through `make config'),or in the kernel's command line.If the .B -t(terse) switch is used together with.B -ionly the decimal number is printed..TP.B -aPrint all symbols in the mapfile. By default the procedures with 0 reportedticks are not printed..TP.B -bPrint individual histogram-bin counts..TP.B -rReset the profiling buffer. This can only be invoked by root, because.B /proc/profileis readable by everybody but writable only by the superuser. However,you can make .B readprofilesetuid 0, in order to reset the buffer without gaining privileges..TP.RB -M " multiplier"On some architectures it is possible to alter the frequency at whichthe kernel delivers profiling interrupts to each CPU.  This option allows you toset the frequency, as a multiplier of the system clock frequency, HZ.This is supported on i386-SMP (2.2 and 2.4 kernel) and also on sparc-SMPand sparc64-SMP (2.4 kernel).  This option also resets the profiling buffer,and requires superuser privileges..TP.B -vVerbose. The output is organized in four columns and filled with blanks.The first column is the RAM address of a kernel function, the second isthe name of the function, the third is the number of clock ticks and thelast is the normalized load..TP.B -VVersion. This makes.B readprofileprint its version number and exit..SH EXAMPLESBrowse the profiling buffer ordering by clock ticks:.nf   readprofile | sort -nr | less.fiPrint the 20 most loaded procedures:.nf   readprofile | sort -nr +2 | head -20.fiPrint only filesystem profile:.nf   readprofile | grep _ext2.fiLook at all the kernel information, with ram addresses".nf   readprofile -av | less.fiBrowse a `freezed' profile buffer for a non current kernel:.nf   readprofile -p ~/profile.freeze -m /zImage.map.gz.fiRequest profiling at 2kHz per CPU, and reset the profiling buffer.nf   sudo readprofile -M 20.fi.SH BUGS.LP.B readprofileonly works with an 1.3.x or newer kernel,because .B /proc/profilechanged in the step from 1.2 to 1.3.LPThis program only works with ELF kernels. The change for a.out kernelsis trivial, and left as an exercise to the a.out user..LPTo enable profiling, the kernel must be rebooted, because no profiling moduleis available, and it wouldn't be easy to build. To enable profiling,you can specify "profile=2" (or another number) on the kernel commandline.The number you specify is the two-exponent used as profiling step..LPProfiling is disabled when interrupts are inhibited. This means that manyprofiling ticks happen when interrupts are re-enabled. Watch out formisleading information..SH FILES.nf/proc/profile              A binary snapshot of the profiling buffer./usr/src/linux/System.map  The symbol table for the kernel./usr/src/linux/*           The program being profiled :-).fi

⌨️ 快捷键说明

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