diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/debugging.texi | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 1b28bf7aa5d..ed3160f4548 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -997,11 +997,12 @@ start looking for ways to optimize that piece. | |||
| 997 | @findex profiler-report | 997 | @findex profiler-report |
| 998 | @findex profiler-stop | 998 | @findex profiler-stop |
| 999 | Emacs has built-in support for this. To begin profiling, type | 999 | Emacs has built-in support for this. To begin profiling, type |
| 1000 | @kbd{M-x profiler-start}. You can choose to profile by processor | 1000 | @w{@kbd{M-x profiler-start}}. You can choose to sample CPU usage |
| 1001 | usage, memory usage, or both. Then run the code you'd like to speed | 1001 | periodically (@code{cpu}), when memory is allocated (@code{memory}), |
| 1002 | up. After that, type @kbd{M-x profiler-report} to display a summary | 1002 | or both. Then run the code you'd like to speed up. After that, type |
| 1003 | buffer for each resource (cpu and memory) that you chose to profile. | 1003 | @kbd{M-x profiler-report} to display a summary buffer for CPU usage |
| 1004 | The names of the report buffers include the times at which the reports | 1004 | sampled by each type (cpu and memory) that you chose to profile. The |
| 1005 | names of the report buffers include the times at which the reports | ||
| 1005 | were generated, so you can generate another report later on without | 1006 | were generated, so you can generate another report later on without |
| 1006 | erasing previous results. When you have finished profiling, type | 1007 | erasing previous results. When you have finished profiling, type |
| 1007 | @kbd{M-x profiler-stop} (there is a small overhead associated with | 1008 | @kbd{M-x profiler-stop} (there is a small overhead associated with |
| @@ -1009,7 +1010,7 @@ profiling, so we don't recommend leaving it active except when you are | |||
| 1009 | actually running the code you want to examine). | 1010 | actually running the code you want to examine). |
| 1010 | 1011 | ||
| 1011 | The profiler report buffer shows, on each line, a function that was | 1012 | The profiler report buffer shows, on each line, a function that was |
| 1012 | called, followed by how much resources (cpu or memory) it used in | 1013 | called, followed by how much CPU resources it used in |
| 1013 | absolute and percentage terms since profiling started. If a given | 1014 | absolute and percentage terms since profiling started. If a given |
| 1014 | line has a @samp{+} symbol at the left-hand side, you can expand that | 1015 | line has a @samp{+} symbol at the left-hand side, you can expand that |
| 1015 | line by typing @kbd{@key{RET}}, in order to see the function(s) called | 1016 | line by typing @kbd{@key{RET}}, in order to see the function(s) called |