#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:53+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man1/sprof.1:25 #, no-wrap msgid "SPROF" msgstr "" #. type: TH #: man-pages/man1/sprof.1:25 #, no-wrap msgid "2014-06-24" msgstr "" #. type: TH #: man-pages/man1/sprof.1:25 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man1/sprof.1:25 #, no-wrap msgid "Linux User Manual" msgstr "" #. type: SH #: man-pages/man1/sprof.1:26 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:28 msgid "sprof - read and display shared object profiling data" msgstr "" #. type: SH #: man-pages/man1/sprof.1:28 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:31 #, no-wrap msgid "B [OPTION]... SHARED-OBJECT-PATH [PROFILE-DATA-PATH]\n" msgstr "" #. type: SH #: man-pages/man1/sprof.1:32 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:45 msgid "" "The B command displays a profiling summary for the shared object " "specified as its first command-line argument. The profiling summary is " "created using previously generated profiling data in the (optional) second " "command-line argument. If the profiling data pathname is omitted, then " "B will attempt to deduce it using the soname of the shared object, " "looking for a file with the name IsonameE.profile> in the current " "directory." msgstr "" #. type: SH #: man-pages/man1/sprof.1:45 #, no-wrap msgid "OPTIONS" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:48 msgid "" "The following command-line options specify the profile output to be produced:" "" msgstr "" #. type: TP #: man-pages/man1/sprof.1:48 #, no-wrap msgid "B<-c>, B<--call-pairs>" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:53 msgid "" "Print a list of pairs of call paths for the interfaces exported by the " "shared object, along with the number of times each path is used." msgstr "" #. type: TP #: man-pages/man1/sprof.1:53 #, no-wrap msgid "B<-p>, B<--flat-profile>" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:57 msgid "" "Generate a flat profile of all of the functions in the monitored object, " "with counts and ticks." msgstr "" #. type: TP #: man-pages/man1/sprof.1:57 #, no-wrap msgid "B<-q>, B<--graph>" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:60 msgid "Generate a call graph." msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:63 msgid "" "If none of the above options is specified, then the default behavior is to " "display a flat profile and a call graph." msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:65 msgid "The following additional command-line options are available:" msgstr "" #. type: TP #: man-pages/man1/sprof.1:65 #, no-wrap msgid "B<-?>, B<--help>" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:68 msgid "Display a summary of command-line options and arguments and exit." msgstr "" #. type: TP #: man-pages/man1/sprof.1:68 #, no-wrap msgid "B<--usage>" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:71 msgid "Display a short usage message and exit." msgstr "" #. type: TP #: man-pages/man1/sprof.1:71 #, no-wrap msgid "B<-V>, B<--version>" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:74 msgid "Display the program version and exit." msgstr "" #. type: SH #: man-pages/man1/sprof.1:74 #, no-wrap msgid "CONFORMING TO" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:78 msgid "The B command is a GNU extension, not present in POSIX.1." msgstr "" #. type: SH #: man-pages/man1/sprof.1:78 #, no-wrap msgid "EXAMPLE" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:84 msgid "" "The following example demonstrates the use of B. The example " "consists of a main program that calls two functions in a shared library. " "First, the code of the main program:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:89 #, no-wrap msgid "$ B\n" "#include Estdlib.hE\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:92 #, no-wrap msgid "void x1(void);\n" "void x2(void);\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:100 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " x1();\n" " x2();\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:109 msgid "" "The functions I and I are defined in the following source file " "that is used to construct the shared library:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:114 #, no-wrap msgid "$ B\n" "#include Eunistd.hE\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:119 #, no-wrap msgid "void\n" "consumeCpu1(int lim)\n" "{\n" " int j;\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:123 man-pages/man1/sprof.1:140 #, no-wrap msgid " for (j = 0; j E lim; j++)\n" " getppid();\n" "}\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:127 #, no-wrap msgid "void\n" "x1(void) {\n" " int j;\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:131 #, no-wrap msgid " for (j = 0; j E 100; j++)\n" " consumeCpu1(200000);\n" "}\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:136 #, no-wrap msgid "void\n" "consumeCpu2(int lim)\n" "{\n" " int j;\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:145 #, no-wrap msgid "void\n" "x2(void)\n" "{\n" " int j;\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:149 #, no-wrap msgid " for (j = 0; j E 1000; j++)\n" " consumeCpu2(10000);\n" "}\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:156 msgid "" "Now we construct the shared library with the real name I, " "and the soname I:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:161 #, no-wrap msgid "" "$ B\n" " B<-o libdemo.so.1.0.1 libdemo.c>\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:166 msgid "" "Then we construct symbolic links for the library soname and the library " "linker name:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:171 #, no-wrap msgid "" "$ B\n" "$ B\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:176 msgid "" "Next, we compile the main program, linking it against the shared library, " "and then list the dynamic dependencies of the program:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:185 #, no-wrap msgid "" "$ B\n" "$ B\n" " linux-vdso.so.1 =E (0x00007fff86d66000)\n" " libdemo.so.1 =E not found\n" " libc.so.6 =E /lib64/libc.so.6 (0x00007fd4dc138000)\n" " /lib64/ld-linux-x86-64.so.2 (0x00007fd4dc51f000)\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:192 msgid "" "In order to get profiling information for the shared library, we define the " "environment variable B with the soname of the library:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:196 #, no-wrap msgid "$ B\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:203 msgid "" "We then define the environment variable B with the " "pathname of the directory where profile output should be written, and create " "that directory if it does not exist already:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:208 #, no-wrap msgid "" "$ B\n" "$ B\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:216 msgid "" "B causes profiling output to be I to the output file " "if it already exists, so we ensure that there is no preexisting profiling " "data:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:220 #, no-wrap msgid "$ B\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:226 msgid "" "We then run the program to produce the profiling output, which is written to " "a file in the directory specified in B:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:232 #, no-wrap msgid "$ B\n" "$ B\n" "libdemo.so.1.profile\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:238 msgid "" "We then use the B option to generate a flat profile with counts " "and ticks:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:243 #, no-wrap msgid "" "$ B\n" "Flat profile:\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:251 #, no-wrap msgid "" "Each sample counts as 0.01 seconds.\n" " % cumulative self self total\n" " time seconds seconds calls us/call us/call name\n" " 60.00 0.06 0.06 100 600.00 consumeCpu1\n" " 40.00 0.10 0.04 1000 40.00 consumeCpu2\n" " 0.00 0.10 0.00 1 0.00 x1\n" " 0.00 0.10 0.00 1 0.00 x2\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:257 msgid "The B option generates a call graph:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:261 #, no-wrap msgid "$ B\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:263 #, no-wrap msgid "index % time self children called name\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:278 #, no-wrap msgid "" " 0.00 0.00 100/100 x1 [1]\n" "[0] 100.0 0.00 0.00 100 consumeCpu1 [0]\n" "-----------------------------------------------\n" " 0.00 0.00 1/1 EUNKNOWNE\n" "[1] 0.0 0.00 0.00 1 x1 [1]\n" " 0.00 0.00 100/100 consumeCpu1 [0]\n" "-----------------------------------------------\n" " 0.00 0.00 1000/1000 x2 [3]\n" "[2] 0.0 0.00 0.00 1000 consumeCpu2 [2]\n" "-----------------------------------------------\n" " 0.00 0.00 1/1 EUNKNOWNE\n" "[3] 0.0 0.00 0.00 1 x2 [3]\n" " 0.00 0.00 1000/1000 consumeCpu2 [2]\n" "-----------------------------------------------\n" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:284 msgid "" "Above and below, the \"EUNKNOWNE\" strings represent identifiers " "that are outside of the profiled object (in this example, these are " "instances of I)." msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:288 msgid "" "The B option generates a list of call pairs and the number of " "their occurrences:" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:296 #, no-wrap msgid "" "$ B\n" "EUNKNOWNE x1 1\n" "x1 consumeCpu1 100\n" "EUNKNOWNE x2 1\n" "x2 consumeCpu2 1000\n" msgstr "" #. type: SH #: man-pages/man1/sprof.1:298 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:302 msgid "B(1), B(1), B(8)" msgstr "" #. type: SH #: man-pages/man1/sprof.1:302 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man1/sprof.1:310 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""