diff options
| author | Glenn Morris | 2018-02-17 07:50:28 -0800 |
|---|---|---|
| committer | Glenn Morris | 2018-02-17 07:50:28 -0800 |
| commit | 4fa90ff8f5fda54fc42049c990c52d3e5236fbe6 (patch) | |
| tree | 6c0a7893b3aab0166b35938338fa289c3a01df74 /doc/lispref | |
| parent | cb3863370cbe574810f796726faa39ba0de0a429 (diff) | |
| parent | e5a29330aae4491fd384bacaff6f453c6434d322 (diff) | |
| download | emacs-4fa90ff8f5fda54fc42049c990c52d3e5236fbe6.tar.gz emacs-4fa90ff8f5fda54fc42049c990c52d3e5236fbe6.zip | |
Merge from origin/emacs-26
e5a2933 (origin/emacs-26) lisp/vc/: documentation fixes
f21f8e6 Document 'desktop-files-not-to-save'
d8917eb Improve documentation of Profiling features
b228839 Improve indexing of "performance" in ELisp manual
ab67b3e Minor change in Emacs manual's VC chapter
c352434 Avoid memory corruption with specpdl overflow + edebug (Bug#3...
593bbda Document comment-fill-column in the manual (Bug#11636)
bd4cc8d * doc/emacs/dired.texi (Marks vs Flags): Copyedits.
69107f3 ; Fix doc typos related to indefinite articles
aaad1e6 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac...
5906418 More fixes for the Emacs manual
9ab3df1 ; Fix doc typos related to indefinite articles
66a4e65 ; Fix doc typos related to indefinite articles
35e5c57 ; Fix doc typos related to indefinite articles
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/buffers.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/debugging.texi | 60 | ||||
| -rw-r--r-- | doc/lispref/edebug.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/package.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 2 |
6 files changed, 42 insertions, 28 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 7e41eb32cce..3750fa60534 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -667,7 +667,7 @@ reason. | |||
| 667 | 667 | ||
| 668 | @defun ask-user-about-supersession-threat filename | 668 | @defun ask-user-about-supersession-threat filename |
| 669 | This function is used to ask a user how to proceed after an attempt to | 669 | This function is used to ask a user how to proceed after an attempt to |
| 670 | modify an buffer visiting file @var{filename} when the file is newer | 670 | modify a buffer visiting file @var{filename} when the file is newer |
| 671 | than the buffer text. Emacs detects this because the modification | 671 | than the buffer text. Emacs detects this because the modification |
| 672 | time of the file on disk is newer than the last save-time and its contents | 672 | time of the file on disk is newer than the last save-time and its contents |
| 673 | have changed. | 673 | have changed. |
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 09692073bf9..2daa8a5578f 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -918,51 +918,65 @@ be cleaner to combine them. | |||
| 918 | @section Profiling | 918 | @section Profiling |
| 919 | @cindex profiling | 919 | @cindex profiling |
| 920 | @cindex profile | 920 | @cindex profile |
| 921 | @cindex performance analysis | ||
| 921 | @cindex measuring resource usage | 922 | @cindex measuring resource usage |
| 922 | @cindex memory usage | 923 | @cindex memory usage |
| 923 | 924 | ||
| 924 | If your program is working correctly, but you want to make it run more | 925 | If your program is working correctly, but not fast enough, and you |
| 925 | quickly or efficiently, the first thing to do is @dfn{profile} your | 926 | want to make it run more quickly or efficiently, the first thing to do |
| 926 | code so that you know how it is using resources. If you find that one | 927 | is @dfn{profile} your code so that you know where it spends most of |
| 927 | particular function is responsible for a significant portion of the | 928 | the execution time. If you find that one particular function is |
| 928 | runtime, you can start looking for ways to optimize that piece. | 929 | responsible for a significant portion of the execution time, you can |
| 930 | start looking for ways to optimize that piece. | ||
| 929 | 931 | ||
| 930 | Emacs has built-in support for this. To begin profiling, type | 932 | Emacs has built-in support for this. To begin profiling, type |
| 931 | @kbd{M-x profiler-start}. You can choose to profile by processor | 933 | @kbd{M-x profiler-start}. You can choose to profile by processor |
| 932 | usage, memory usage, or both. After doing some work, type | 934 | usage, memory usage, or both. Then run the code you'd like to speed |
| 933 | @kbd{M-x profiler-report} to display a summary buffer for each | 935 | up. After that, type @kbd{M-x profiler-report} to display a summary |
| 934 | resource that you chose to profile. The names of the report buffers | 936 | buffer for each resource (cpu and memory) that you chose to profile. |
| 935 | include the times at which the reports were generated, so you can | 937 | The names of the report buffers include the times at which the reports |
| 936 | generate another report later on without erasing previous results. | 938 | were generated, so you can generate another report later on without |
| 937 | When you have finished profiling, type @kbd{M-x profiler-stop} (there | 939 | erasing previous results. When you have finished profiling, type |
| 938 | is a small overhead associated with profiling). | 940 | @kbd{M-x profiler-stop} (there is a small overhead associated with |
| 941 | profiling, so we don't recommend leaving it active except when you are | ||
| 942 | actually running the code you want to examine). | ||
| 939 | 943 | ||
| 940 | The profiler report buffer shows, on each line, a function that was | 944 | The profiler report buffer shows, on each line, a function that was |
| 941 | called, followed by how much resource (processor or memory) it used in | 945 | called, followed by how much resources (cpu or memory) it used in |
| 942 | absolute and percentage times since profiling started. If a given | 946 | absolute and percentage terms since profiling started. If a given |
| 943 | line has a @samp{+} symbol at the left-hand side, you can expand that | 947 | line has a @samp{+} symbol at the left-hand side, you can expand that |
| 944 | line by typing @kbd{@key{RET}}, in order to see the function(s) called | 948 | line by typing @kbd{@key{RET}}, in order to see the function(s) called |
| 945 | by the higher-level function. Use a prefix argument (@kbd{C-u | 949 | by the higher-level function. Use a prefix argument (@kbd{C-u |
| 946 | @key{RET}}) to see the whole call tree below a function. Pressing | 950 | @key{RET}}) to see the whole call tree below a function. Pressing |
| 947 | @kbd{@key{RET}} again will collapse back to the original state. | 951 | @kbd{@key{RET}} again will collapse back to the original state. |
| 948 | 952 | ||
| 949 | Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function. | 953 | Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function |
| 950 | Press @kbd{d} to view a function's documentation. | 954 | at point. Press @kbd{d} to view a function's documentation. You can |
| 951 | You can save a profile to a file using @kbd{C-x C-w}. | 955 | save a profile to a file using @kbd{C-x C-w}. You can compare two |
| 952 | You can compare two profiles using @kbd{=}. | 956 | profiles using @kbd{=}. |
| 953 | 957 | ||
| 954 | @c FIXME reversed calltree? | 958 | @c FIXME reversed calltree? |
| 955 | 959 | ||
| 956 | @cindex @file{elp.el} | 960 | @cindex @file{elp.el} |
| 957 | @cindex timing programs | 961 | @cindex timing programs |
| 958 | The @file{elp} library offers an alternative approach. See the file | 962 | The @file{elp} library offers an alternative approach, which is useful |
| 959 | @file{elp.el} for instructions. | 963 | when you know in advance which Lisp function(s) you want to profile. |
| 964 | Using that library, you begin by setting @code{elp-function-list} to | ||
| 965 | the list of function symbols---those are the functions you want to | ||
| 966 | profile. Then type @w{@kbd{M-x elp-instrument-list @key{RET} nil | ||
| 967 | @key{RET}}} to arrange for profiling those functions. After running | ||
| 968 | the code you want to profile, invoke @w{@kbd{M-x elp-results}} to | ||
| 969 | display the current results. See the file @file{elp.el} for more | ||
| 970 | detailed instructions. This approach is limited to profiling | ||
| 971 | functions written in Lisp, it cannot profile Emacs primitives. | ||
| 960 | 972 | ||
| 961 | @cindex @file{benchmark.el} | 973 | @cindex @file{benchmark.el} |
| 962 | @cindex benchmarking | 974 | @cindex benchmarking |
| 963 | You can check the speed of individual Emacs Lisp forms using the | 975 | You can measure the time it takes to evaluate individual Emacs Lisp |
| 964 | @file{benchmark} library. See the functions @code{benchmark-run} and | 976 | forms using the @file{benchmark} library. See the macros |
| 965 | @code{benchmark-run-compiled} in @file{benchmark.el}. | 977 | @code{benchmark-run} and @code{benchmark-run-compiled} in |
| 978 | @file{benchmark.el}. You can also use the @code{benchmark} command | ||
| 979 | for timing forms interactively. | ||
| 966 | 980 | ||
| 967 | @c Not worth putting in the printed manual. | 981 | @c Not worth putting in the printed manual. |
| 968 | @ifnottex | 982 | @ifnottex |
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 0c17e1e72ef..031fe65266e 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi | |||
| @@ -898,7 +898,7 @@ lines inserted. | |||
| 898 | 898 | ||
| 899 | @cindex coverage testing (Edebug) | 899 | @cindex coverage testing (Edebug) |
| 900 | @cindex frequency counts | 900 | @cindex frequency counts |
| 901 | @cindex performance analysis | 901 | @cindex performance analysis (Edebug) |
| 902 | Edebug provides rudimentary coverage testing and display of execution | 902 | Edebug provides rudimentary coverage testing and display of execution |
| 903 | frequency. | 903 | frequency. |
| 904 | 904 | ||
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 877aaf89a35..d179cf56fd2 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi | |||
| @@ -199,7 +199,7 @@ standard keyword from the @code{finder-known-keywords} list. | |||
| 199 | as explained in @ref{Packaging Basics}. In the above example, a magic | 199 | as explained in @ref{Packaging Basics}. In the above example, a magic |
| 200 | comment autoloads @code{superfrobnicator-mode}. | 200 | comment autoloads @code{superfrobnicator-mode}. |
| 201 | 201 | ||
| 202 | @xref{Package Archives}, for a explanation of how to add a | 202 | @xref{Package Archives}, for an explanation of how to add a |
| 203 | single-file package to a package archive. | 203 | single-file package to a package archive. |
| 204 | 204 | ||
| 205 | @node Multi-file Packages | 205 | @node Multi-file Packages |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 299ed0b7d98..51a440cce74 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -2981,7 +2981,7 @@ optional argument @var{append} is non-@code{nil}, @var{face} is | |||
| 2981 | appended to the end of the list instead. Note that in a face list, | 2981 | appended to the end of the list instead. Note that in a face list, |
| 2982 | the first occurring value for each attribute takes precedence. | 2982 | the first occurring value for each attribute takes precedence. |
| 2983 | 2983 | ||
| 2984 | For example, the following code would assign a italicized green face | 2984 | For example, the following code would assign an italicized green face |
| 2985 | to the text between @var{start} and @var{end}: | 2985 | to the text between @var{start} and @var{end}: |
| 2986 | 2986 | ||
| 2987 | @example | 2987 | @example |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 5ab6d6ee6a4..687d5971920 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -862,7 +862,7 @@ If the optional argument @var{pixelwise} is non-@code{nil}, | |||
| 862 | A positive @var{delta} moves the edge downwards or to the right; a | 862 | A positive @var{delta} moves the edge downwards or to the right; a |
| 863 | negative @var{delta} moves it upwards or to the left. If the edge | 863 | negative @var{delta} moves it upwards or to the left. If the edge |
| 864 | cannot be moved as far as specified by @var{delta}, this function | 864 | cannot be moved as far as specified by @var{delta}, this function |
| 865 | moves it as far as possible but does not signal a error. | 865 | moves it as far as possible but does not signal an error. |
| 866 | 866 | ||
| 867 | This function tries to resize windows adjacent to the edge that is | 867 | This function tries to resize windows adjacent to the edge that is |
| 868 | moved. If this is not possible for some reason (e.g., if that adjacent | 868 | moved. If this is not possible for some reason (e.g., if that adjacent |