diff options
Diffstat (limited to 'lib/tools/doc/src')
-rw-r--r-- | lib/tools/doc/src/Makefile | 17 | ||||
-rw-r--r-- | lib/tools/doc/src/fascicules.xml | 18 | ||||
-rw-r--r-- | lib/tools/doc/src/lcnt.xml | 104 | ||||
-rw-r--r-- | lib/tools/doc/src/lcnt_chapter.xml | 9 | ||||
-rw-r--r-- | lib/tools/doc/src/note.gif | bin | 1539 -> 0 bytes | |||
-rw-r--r-- | lib/tools/doc/src/notes.xml | 69 | ||||
-rw-r--r-- | lib/tools/doc/src/part_notes.xml | 39 | ||||
-rw-r--r-- | lib/tools/doc/src/part_notes_history.xml | 39 | ||||
-rw-r--r-- | lib/tools/doc/src/venn2.fig | 66 | ||||
-rw-r--r-- | lib/tools/doc/src/venn2.gif | bin | 3369 -> 3507 bytes | |||
-rw-r--r-- | lib/tools/doc/src/warning.gif | bin | 1498 -> 0 bytes | |||
-rw-r--r-- | lib/tools/doc/src/xref.xml | 12 |
12 files changed, 211 insertions, 162 deletions
diff --git a/lib/tools/doc/src/Makefile b/lib/tools/doc/src/Makefile index d9c3b0ad2a..7011f869cd 100644 --- a/lib/tools/doc/src/Makefile +++ b/lib/tools/doc/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2016. All Rights Reserved. +# Copyright Ericsson AB 1997-2017. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,9 +47,9 @@ XML_REF3_FILES = \ make.xml \ tags.xml \ xref.xml \ - erlang_mode.xml + erlang_mode.xml -XML_PART_FILES = part.xml part_notes.xml part_notes_history.xml +XML_PART_FILES = part.xml XML_CHAPTER_FILES = \ cover_chapter.xml \ @@ -86,9 +86,9 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf # ---------------------------------------------------- -# FLAGS +# FLAGS # ---------------------------------------------------- -XML_FLAGS += +XML_FLAGS += # ---------------------------------------------------- # Targets @@ -108,17 +108,17 @@ man: $(MAN3_FILES) gifs: $(GIF_FILES:%=$(HTMLDIR)/%) -debug opt: +debug opt: clean clean_docs: rm -rf $(HTMLDIR)/* rm -f $(MAN3DIR)/* rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) - rm -f errs core *~ + rm -f errs core *~ # ---------------------------------------------------- # Release Target -# ---------------------------------------------------- +# ---------------------------------------------------- include $(ERL_TOP)/make/otp_release_targets.mk release_docs_spec: docs @@ -132,4 +132,3 @@ release_docs_spec: docs $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3" release_spec: - diff --git a/lib/tools/doc/src/fascicules.xml b/lib/tools/doc/src/fascicules.xml deleted file mode 100644 index 37feca543f..0000000000 --- a/lib/tools/doc/src/fascicules.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE fascicules SYSTEM "fascicules.dtd"> - -<fascicules> - <fascicule file="part" href="part_frame.html" entry="no"> - User's Guide - </fascicule> - <fascicule file="ref_man" href="ref_man_frame.html" entry="yes"> - Reference Manual - </fascicule> - <fascicule file="part_notes" href="part_notes_frame.html" entry="no"> - Release Notes - </fascicule> - <fascicule file="" href="../../../../doc/print.html" entry="no"> - Off-Print - </fascicule> -</fascicules> - diff --git a/lib/tools/doc/src/lcnt.xml b/lib/tools/doc/src/lcnt.xml index 31e5c241e9..5bdfc60448 100644 --- a/lib/tools/doc/src/lcnt.xml +++ b/lib/tools/doc/src/lcnt.xml @@ -109,14 +109,6 @@ statistics. If the server held any lock statistics data before the collect then that data is lost. </p> - <note> - <p> - When collection occurs the runtime system transitions to a single thread, - blocking all other threads. No other tasks will be scheduled during this - operation. Depending on the size of the data this might take a long time - (several seconds) and cause timeouts in the system. - </p> - </note> </desc> </func> @@ -322,24 +314,22 @@ <func> <name>apply(Fun) -> term()</name> <fsummary>Same as <c>apply(Fun, [])</c>.</fsummary> + <type> + <v>Fun = fun()</v> + </type> <desc> <p>Same as <c>apply(Fun, [])</c>.</p> </desc> </func> <func> <name>apply(Fun, Args) -> term()</name> - <fsummary>Clears counters, applies function and collects the profiling results.</fsummary> + <fsummary>Same as <c>apply(Module, Function, Args)</c>.</fsummary> <type> <v>Fun = fun()</v> <v>Args = [term()]</v> </type> <desc> - <p> Clears the lock counters and then setups the instrumentation to save all destroyed locks. - After setup the fun is called, passing the elements in <c>Args</c> as arguments. - When the fun returns the statistics are immediately collected to the server. After the - collection the instrumentation is returned to its previous behavior. - The result of the applied fun is returned. - </p> + <p>Same as <c>apply(Module, Function, Args)</c>.</p> </desc> </func> <func> @@ -357,6 +347,13 @@ collection the instrumentation is returned to its previous behavior. The result of the applied function is returned. </p> + <warning> + <p> + This function should only be used for micro-benchmarks; it sets <c>copy_save</c> + to <c>true</c> for the duration of the call, which can quickly lead to running + out of memory. + </p> + </warning> </desc> </func> @@ -429,6 +426,68 @@ <desc> <p>Clear the internal counters. Same as <c>lcnt:clear(Node)</c>.</p></desc> </func> + <func> + <name>rt_mask() -> [category_atom()]</name> + <fsummary>Same as <c>rt_mask(node())</c>.</fsummary> + <desc><p>Same as <c>rt_mask(node())</c>.</p></desc> + </func> + + <func> + <name>rt_mask(Node) -> [category_atom()]</name> + <fsummary>Returns the current lock category mask.</fsummary> + <type> + <v>Node = node()</v> + </type> + <desc> + <p> + Refer to <c>rt_mask/2</c> for a list of valid categories. All + categories are enabled by default. + </p> + </desc> + </func> + + <func> + <name>rt_mask(Categories) -> ok | {error, copy_save_enabled}</name> + <fsummary>Same as <c>rt_mask(node(), Categories)</c>.</fsummary> + <type> + <v>Categories = [atom()]</v> + </type> + <desc><p>Same as <c>rt_mask(node(), Categories)</c>.</p></desc> + </func> + + <func> + <name>rt_mask(Node, Categories) -> ok | {error, copy_save_enabled}</name> + <fsummary>Changes the lock category mask.</fsummary> + <type> + <v>Node = node()</v> + <v>Categories = [atom()]</v> + </type> + <desc> + <p> + Sets the lock category mask to the given categories. + </p> + <p> + This will fail if the <c>copy_save</c> option is enabled; see + <c>lcnt:rt_opt/2</c>. + </p> + <p>Valid categories are:</p> + <list> + <item><c>allocator</c></item> + <item><c>db</c> (ETS tables)</item> + <item><c>debug</c></item> + <item><c>distribution</c></item> + <item><c>generic</c></item> + <item><c>io</c></item> + <item><c>process</c></item> + <item><c>scheduler</c></item> + </list> + <p> + This list is subject to change at any time, as is the category any given lock + may belong to. + </p> + </desc> + </func> + <func> <name>rt_opt({Type, bool()}) -> bool()</name> <fsummary>Same as <c>rt_opt(node(), {Type, Opt})</c>.</fsummary> @@ -442,16 +501,25 @@ <v>Type = copy_save | process_locks</v> </type> <desc> - <p>Changes the lock counter behavior and returns the previous behaviour.</p> <p>Option description:</p> <taglist> <tag><c>{copy_save, bool()}</c></tag> - <item>Enable statistics saving from destroyed locks by copying. This might consume a lot of memory. + <item>Retains the statistics of destroyed locks. <br/>Default: <c>false</c> + <warning> + <p> + This option will use a lot of memory when enabled, which must be + reclaimed with <c>lcnt:rt_clear</c>. Note that it makes no distinction + between locks that were destroyed and locks for which counting was + disabled, so enabling this option will disable changes to the lock + category mask. + </p> + </warning> </item> <tag><c>{process_locks, bool()}</c></tag> - <item>Profile process locks. + <item>Profile process locks, equal to adding <c>process</c> to the lock category mask; + see <c>lcnt:rt_mask/2</c> <br/>Default: <c>true</c> </item> </taglist> diff --git a/lib/tools/doc/src/lcnt_chapter.xml b/lib/tools/doc/src/lcnt_chapter.xml index c73fcb31e0..24b58136aa 100644 --- a/lib/tools/doc/src/lcnt_chapter.xml +++ b/lib/tools/doc/src/lcnt_chapter.xml @@ -29,7 +29,7 @@ <approved>nobody</approved> <checked>no</checked> <date>2009-11-26</date> - <rev>PA1</rev> + <rev>PA2</rev> <file>lcnt_chapter.xml</file> </header> <p> @@ -97,8 +97,11 @@ ok ok </pre> <p> - Another way to to profile a specific function is to use <c>lcnt:apply/3</c> or <c>lcnt:apply/1</c> which does <c>lcnt:clear/0</c> before the function and <c>lcnt:collect/0</c> after its invocation. - It also sets <c>copy_save</c> to <c>true</c> for the duration of the function call + Another way to to profile a specific function is to use <c>lcnt:apply/3</c> or <c>lcnt:apply/1</c> + which does <c>lcnt:clear/0</c> before the function and <c>lcnt:collect/0</c> after its invocation. + This method should only be used in micro-benchmarks since it sets <c>copy_save</c> to <c>true</c> + for the duration of the function call, which may cause the emulator to run out of memory if + attempted under load. </p> <pre> Erlang R13B03 (erts-5.7.4) [source] [smp:8:8] [rq:8] [async-threads:0] [hipe] diff --git a/lib/tools/doc/src/note.gif b/lib/tools/doc/src/note.gif Binary files differdeleted file mode 100644 index 6fffe30419..0000000000 --- a/lib/tools/doc/src/note.gif +++ /dev/null diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml index f0df43bf2b..3eaa2058a0 100644 --- a/lib/tools/doc/src/notes.xml +++ b/lib/tools/doc/src/notes.xml @@ -31,6 +31,75 @@ </header> <p>This document describes the changes made to the Tools application.</p> +<section><title>Tools 2.11</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> The predefined Xref analysis <c>locals_not_used</c> + no longer reports unused functions with the + <c>-on_load()</c> attribute.</p> <p> The new predefined + Xref variable <c>OL</c> holds all functions with the + <c>-on_load()</c> attribute. </p> + <p> + Own Id: OTP-14344</p> + </item> + <item> + <p> + In fprof when sampling multiple processes and analyzing + with totals set to true, the output now sums together all + caller and callee entries which concerns the same + function. Previous behaviour was to report each + contributing entry separately.</p> + <p> + Own Id: OTP-14500</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Lock counting can now be fully toggled at runtime in + the lock counting emulator (<c>-emu_type lcnt</c>). + Everything is enabled by default to match the old + behavior, but specific categories can be toggled at will + with minimal runtime overhead when disabled. Refer to the + documentation on <c>lcnt:rt_mask/1</c> for details.</p> + <p> + Own Id: OTP-13170</p> + </item> + <item> + <p><c>lcnt:collect</c> and <c>lcnt:clear</c> will no + longer block all other threads in the runtime system.</p> + <p> + Own Id: OTP-14412</p> + </item> + <item> + <p> + General Unicode improvements.</p> + <p> + Own Id: OTP-14462</p> + </item> + <item> + <p> + Tools are updated to show Unicode atoms correctly.</p> + <p> + Own Id: OTP-14464</p> + </item> + <item> + <p>Add <c>erlang:iolist_to_iovec/1</c>, which converts an + iolist() to an erlang:iovec(), which suitable for use + with <c>enif_inspect_iovec</c>.</p> + <p> + Own Id: OTP-14520</p> + </item> + </list> + </section> + +</section> + <section><title>Tools 2.10.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/tools/doc/src/part_notes.xml b/lib/tools/doc/src/part_notes.xml deleted file mode 100644 index c4c6fa4d7d..0000000000 --- a/lib/tools/doc/src/part_notes.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE part SYSTEM "part.dtd"> - -<part xmlns:xi="http://www.w3.org/2001/XInclude"> - <header> - <copyright> - <year>2004</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>Tools Release Notes</title> - <prepared></prepared> - <docno></docno> - <date></date> - <rev></rev> - </header> - <description> - <p>The <em>Tools</em> application contains a number of stand-alone - tools, which are useful when developing Erlang programs.</p> - <p>For information about older versions, see - <url href="part_notes_history_frame.html">Release Notes History</url>.</p> - </description> - <xi:include href="notes.xml"/> -</part> - diff --git a/lib/tools/doc/src/part_notes_history.xml b/lib/tools/doc/src/part_notes_history.xml deleted file mode 100644 index a34e35fc56..0000000000 --- a/lib/tools/doc/src/part_notes_history.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE part SYSTEM "part.dtd"> - -<part> - <header> - <copyright> - <year>2006</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>Tools Release Notes History</title> - <prepared></prepared> - <docno></docno> - <date></date> - <rev></rev> - </header> - <description> - <p>The <em>Tools</em> application contains a number of stand-alone - tools, which are useful when developing Erlang programs.</p> - </description> - <include file="notes_history"></include> -</part> - diff --git a/lib/tools/doc/src/venn2.fig b/lib/tools/doc/src/venn2.fig index 3694c12f0c..233686a729 100644 --- a/lib/tools/doc/src/venn2.fig +++ b/lib/tools/doc/src/venn2.fig @@ -1,4 +1,4 @@ -#FIG 3.2 +#FIG 3.2 Produced by xfig version 3.2.5c Portrait Center Inches @@ -7,34 +7,7 @@ Letter Single -2 1200 2 -6 3392 953 5034 3329 -6 3392 953 5034 2595 -6 3392 953 5034 2595 -5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 2652.489 1773.500 3518 1357 3613 1774 3518 2190 -5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 6306.956 1773.000 4028 2575 3891 1774 4028 971 -5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 2105.283 1773.000 4402 971 4538 1774 4402 2575 -1 1 0 1 -1 7 0 0 -1 0.000 1 0.0000 4214 1774 820 821 4214 1774 3659 1171 -2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1 - 4821 2325 -2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2 - 4816 1217 4816 2329 -2 1 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 2 - 3392 1769 4816 1769 -2 1 0 1 0 0 100 0 1 0.000 0 0 -1 0 0 2 - 4816 1982 5008 1982 --6 -2 3 0 0 0 0 101 0 5 0.000 0 0 -1 0 0 36 - 4026 977 4011 1025 3996 1072 3981 1120 3966 1177 3954 1225 - 3944 1272 3929 1327 3919 1412 3909 1477 3899 1540 3894 1592 - 3894 1642 3891 1697 3889 1742 3889 1770 3394 1767 3396 1717 - 3399 1665 3409 1610 3424 1555 3439 1502 3464 1440 3489 1390 - 3516 1340 3551 1292 3584 1250 3631 1200 3679 1150 3731 1110 - 3801 1065 3869 1030 3931 1005 3986 982 4009 980 4026 977 --6 -4 0 0 101 0 0 11 0.0000 4 105 525 3965 3044 X - XU\001 -4 0 0 101 0 0 11 0.0000 4 150 1110 3688 3299 exports_not_used\001 --6 -6 5850 938 7560 3329 +6 5850 938 8070 3344 6 5884 938 7526 2580 6 5884 938 7526 2580 5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 5144.489 1758.500 6010 1342 6105 1759 6010 2175 @@ -63,8 +36,8 @@ Single 7019 1990 7022 1945 7027 1900 7029 1855 7029 1805 7032 1765 7029 1752 7309 1757 -6 -4 0 0 101 0 0 11 0.0000 4 135 1470 6000 3014 L * (UU + (XU - LU))\001 -4 0 0 101 0 0 11 0.0000 4 150 1800 5850 3299 locals_not_used (simplified)\001 +4 0 0 101 0 0 11 0.0000 4 180 2070 6000 3014 (L-OL) * (UU + (XU-LU))\001 +4 0 0 101 0 0 11 0.0000 4 180 2160 5850 3299 locals_not_used (simplified)\001 -6 6 900 900 2550 3600 6 900 900 2550 2625 @@ -91,7 +64,34 @@ Single 2330 1222 2365 1265 2402 1317 2437 1382 2477 1455 2500 1517 2520 1585 2532 1645 2540 1712 2542 1780 2540 1842 2535 1907 2527 1957 2517 1990 2325 1987 2330 1222 -4 0 0 101 0 0 11 0.0000 4 105 780 1331 3044 XU - X - B\001 -4 0 0 101 0 0 11 0.0000 4 150 1260 1113 3314 undefined_functions\001 +4 0 0 101 0 0 11 0.0000 4 135 825 1331 3044 XU - X - B\001 +4 0 0 101 0 0 11 0.0000 4 180 1530 1113 3314 undefined_functions\001 4 0 0 100 0 0 10 0.0000 4 135 1005 1275 3525 (modules mode)\001 -6 +6 3392 953 5034 3329 +6 3392 953 5034 2595 +6 3392 953 5034 2595 +5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 2652.489 1773.500 3518 1357 3613 1774 3518 2190 +5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 6306.956 1773.000 4028 2575 3891 1774 4028 971 +5 1 0 1 -1 7 0 0 -1 0.000 0 0 0 0 2105.283 1773.000 4402 971 4538 1774 4402 2575 +1 1 0 1 -1 7 0 0 -1 0.000 1 0.0000 4214 1774 820 821 4214 1774 3659 1171 +2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1 + 4821 2325 +2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2 + 4816 1217 4816 2329 +2 1 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 2 + 3392 1769 4816 1769 +2 1 0 1 0 0 100 0 1 0.000 0 0 -1 0 0 2 + 4816 1982 5008 1982 +-6 +2 3 0 0 0 0 101 0 5 0.000 0 0 -1 0 0 36 + 4026 977 4011 1025 3996 1072 3981 1120 3966 1177 3954 1225 + 3944 1272 3929 1327 3919 1412 3909 1477 3899 1540 3894 1592 + 3894 1642 3891 1697 3889 1742 3889 1770 3394 1767 3396 1717 + 3399 1665 3409 1610 3424 1555 3439 1502 3464 1440 3489 1390 + 3516 1340 3551 1292 3584 1250 3631 1200 3679 1150 3731 1110 + 3801 1065 3869 1030 3931 1005 3986 982 4009 980 4026 977 +-6 +4 0 0 101 0 0 11 0.0000 4 135 555 3965 3044 X - XU\001 +4 0 0 101 0 0 11 0.0000 4 180 1350 3688 3299 exports_not_used\001 +-6 diff --git a/lib/tools/doc/src/venn2.gif b/lib/tools/doc/src/venn2.gif Binary files differindex 4cfea24646..bb12f4bd1f 100644 --- a/lib/tools/doc/src/venn2.gif +++ b/lib/tools/doc/src/venn2.gif diff --git a/lib/tools/doc/src/warning.gif b/lib/tools/doc/src/warning.gif Binary files differdeleted file mode 100644 index 96af52360e..0000000000 --- a/lib/tools/doc/src/warning.gif +++ /dev/null diff --git a/lib/tools/doc/src/xref.xml b/lib/tools/doc/src/xref.xml index 8c49f3a206..6f833246ad 100644 --- a/lib/tools/doc/src/xref.xml +++ b/lib/tools/doc/src/xref.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>2000</year><year>2016</year> + <year>2000</year><year>2017</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -347,6 +347,9 @@ represented by <item>Locally Used Functions (*). Functions of all modules that have been used in some local call. </item> + <tag><c>OL</c></tag> + <item>Functions with an attribute tag <c>on_load</c> (*). + </item> <tag><c>LC</c></tag> <item>Local Calls (*).</item> <tag><c>XC</c></tag> @@ -393,6 +396,7 @@ facts about the <c>LU</c> and <c>XU</c> may have elements in common. Put in another way:</item> <item><c>V</c> is equal to <c>UU + XU + LU</c>.</item> + <item><c>OL</c> is a subset of <c>F</c>.</item> <item><c>E</c> is equal to <c>LC + XC</c>. Note that <c>LC</c> and <c>XC</c> may have elements in common, namely if some function is locally and externally used from one and the same @@ -559,8 +563,10 @@ Two functions (modules, analyzing operators: </p> <list type="bulleted"> - <item>Expression ::= Expression GraphOp Expression</item> - <item>GraphOp ::= <c>components</c> | <c>condensation</c> | <c>of</c></item> + <item>Expression ::= Expression BinaryGraphOp Expression</item> + <item>Expression ::= UnaryGraphOp Expression</item> + <item>UnaryGraphOp ::= <c>components</c> | <c>condensation</c></item> + <item>BinaryGraphOp ::= <c>of</c></item> </list> <p>As was mentioned before, the graph analyses operate on the <c>digraph</c> representation of graphs. |