Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
5591-Move-instrument.erl-to-runtime_tools.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5591-Move-instrument.erl-to-runtime_tools.patch of Package erlang
From 76716497302c8485be42fff87aabef80f2c2a491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@dashbit.co> Date: Thu, 9 Feb 2023 11:20:26 +0100 Subject: [PATCH] Move instrument.erl to runtime_tools instrument.erl can be a useful tool for debugging memory allocation and memory leaks in production systems. For example, eventually we could have a button in Observer that invokes instrument and prints a histogram on demand. For this purpose, however, it must be part of runtime_tools. --- erts/doc/src/erlang.xml | 4 ++-- erts/doc/src/erts_alloc.xml | 4 ++-- lib/runtime_tools/doc/src/Makefile | 1 + lib/{tools => runtime_tools}/doc/src/instrument.xml | 0 lib/runtime_tools/doc/src/ref_man.xml | 1 + lib/runtime_tools/doc/src/specs.xml | 1 + lib/runtime_tools/src/Makefile | 1 + lib/{tools => runtime_tools}/src/instrument.erl | 0 lib/runtime_tools/src/runtime_tools.app.src | 2 +- lib/runtime_tools/test/Makefile | 1 + lib/{tools => runtime_tools}/test/instrument_SUITE.erl | 0 lib/tools/doc/src/Makefile | 1 - lib/tools/doc/src/part.xml | 3 --- lib/tools/doc/src/ref_man.xml | 5 ----- lib/tools/doc/src/specs.xml | 1 - lib/tools/src/Makefile | 1 - lib/tools/src/tools.app.src | 1 - lib/tools/test/Makefile | 1 - system/doc/efficiency_guide/profiling.xml | 2 +- 19 files changed, 11 insertions(+), 19 deletions(-) rename lib/{tools => runtime_tools}/doc/src/instrument.xml (100%) rename lib/{tools => runtime_tools}/src/instrument.erl (100%) rename lib/{tools => runtime_tools}/test/instrument_SUITE.erl (100%) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index e25976c38b..175bc5a95a 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4316,7 +4316,7 @@ is_process_alive(P2Pid), <p>The total amount of memory currently allocated for the emulator that is not directly related to any Erlang process. Memory presented as <c>processes</c> is not - included in this memory. <seeerl marker="tools:instrument"> + included in this memory. <seeerl marker="runtime_tools:instrument"> <c>instrument(3)</c></seeerl> can be used to get a more detailed breakdown of what memory is part of this type.</p> @@ -4358,7 +4358,7 @@ is_process_alive(P2Pid), when the emulator is run with instrumentation.</p> <p>For information on how to run the emulator with instrumentation, see - <seeerl marker="tools:instrument"> + <seeerl marker="runtime_tools:instrument"> <c>instrument(3)</c></seeerl> and/or <seecom marker="erl"><c>erl(1)</c></seecom>.</p> </item> diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index da293f9c45..32fb03e299 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -573,7 +573,7 @@ <item> <p>Adds a small tag to each allocated block that contains basic information about what it is and who allocated it. Use the - <seeerl marker="tools:instrument"><c>instrument</c></seeerl> + <seeerl marker="runtime_tools:instrument"><c>instrument</c></seeerl> module to inspect this information.</p> <p>The runtime overhead is one word per allocation when enabled. This @@ -913,7 +913,7 @@ <seeerl marker="erlang"><c>erlang(3)</c></seeerl>, <seeerl marker="runtime_tools:erts_alloc_config"> <c>erts_alloc_config(3)</c></seeerl>, - <seeerl marker="tools:instrument"> + <seeerl marker="runtime_tools:instrument"> <c>instrument(3)</c></seeerl></p> </section> </cref> diff --git a/lib/runtime_tools/doc/src/Makefile b/lib/runtime_tools/doc/src/Makefile index bed1358730..eb8dee2dee 100644 --- a/lib/runtime_tools/doc/src/Makefile +++ b/lib/runtime_tools/doc/src/Makefile @@ -40,6 +40,7 @@ XML_REF3_FILES = \ dbg.xml \ dyntrace.xml \ erts_alloc_config.xml \ + instrument.xml \ system_information.xml \ msacc.xml \ scheduler.xml diff --git a/lib/tools/doc/src/instrument.xml b/lib/runtime_tools/doc/src/instrument.xml similarity index 100% rename from lib/tools/doc/src/instrument.xml rename to lib/runtime_tools/doc/src/instrument.xml diff --git a/lib/runtime_tools/doc/src/ref_man.xml b/lib/runtime_tools/doc/src/ref_man.xml index fdca65422d..ea6e55893a 100644 --- a/lib/runtime_tools/doc/src/ref_man.xml +++ b/lib/runtime_tools/doc/src/ref_man.xml @@ -36,6 +36,7 @@ <xi:include href="dbg.xml"/> <xi:include href="dyntrace.xml"/> <xi:include href="erts_alloc_config.xml"/> + <xi:include href="instrument.xml"/> <xi:include href="msacc.xml"/> <xi:include href="scheduler.xml"/> <xi:include href="system_information.xml"/> diff --git a/lib/runtime_tools/doc/src/specs.xml b/lib/runtime_tools/doc/src/specs.xml index 33fe7fa370..f3152d0f0c 100644 --- a/lib/runtime_tools/doc/src/specs.xml +++ b/lib/runtime_tools/doc/src/specs.xml @@ -3,4 +3,5 @@ <xi:include href="../specs/specs_system_information.xml"/> <xi:include href="../specs/specs_msacc.xml"/> <xi:include href="../specs/specs_scheduler.xml"/> + <xi:include href="../specs/specs_instrument.xml"/> </specs> diff --git a/lib/runtime_tools/src/Makefile b/lib/runtime_tools/src/Makefile index 8e8c4074f5..6fe6511a64 100644 --- a/lib/runtime_tools/src/Makefile +++ b/lib/runtime_tools/src/Makefile @@ -38,6 +38,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/runtime_tools-$(VSN) MODULES= \ appmon_info \ erts_alloc_config \ + instrument \ runtime_tools \ runtime_tools_sup \ dbg \ diff --git a/lib/tools/src/instrument.erl b/lib/runtime_tools/src/instrument.erl similarity index 100% rename from lib/tools/src/instrument.erl rename to lib/runtime_tools/src/instrument.erl diff --git a/lib/runtime_tools/src/runtime_tools.app.src b/lib/runtime_tools/src/runtime_tools.app.src index dfdd58015b..0738ddf3e4 100644 --- a/lib/runtime_tools/src/runtime_tools.app.src +++ b/lib/runtime_tools/src/runtime_tools.app.src @@ -23,7 +23,7 @@ {modules, [appmon_info, dbg,observer_backend,runtime_tools, runtime_tools_sup,erts_alloc_config, ttb_autostart,dyntrace,system_information, - scheduler, + scheduler, instrument, msacc]}, {registered, [runtime_tools_sup]}, {applications, [kernel, stdlib]}, diff --git a/lib/runtime_tools/test/Makefile b/lib/runtime_tools/test/Makefile index c9578d376e..429683f044 100644 --- a/lib/runtime_tools/test/Makefile +++ b/lib/runtime_tools/test/Makefile @@ -5,6 +5,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk MODULES = \ dyntrace_SUITE \ dyntrace_lttng_SUITE \ + instrument_SUITE \ runtime_tools_SUITE \ system_information_SUITE \ dbg_SUITE \ diff --git a/lib/tools/test/instrument_SUITE.erl b/lib/runtime_tools/test/instrument_SUITE.erl similarity index 100% rename from lib/tools/test/instrument_SUITE.erl rename to lib/runtime_tools/test/instrument_SUITE.erl diff --git a/lib/tools/doc/src/Makefile b/lib/tools/doc/src/Makefile index 63218e793f..d58c381c31 100644 --- a/lib/tools/doc/src/Makefile +++ b/lib/tools/doc/src/Makefile @@ -38,7 +38,6 @@ XML_REF3_FILES = \ fprof.xml \ cprof.xml \ lcnt.xml \ - instrument.xml \ make.xml \ tags.xml \ xref.xml \ diff --git a/lib/tools/doc/src/part.xml b/lib/tools/doc/src/part.xml index 796047fe8d..a8f45636e0 100644 --- a/lib/tools/doc/src/part.xml +++ b/lib/tools/doc/src/part.xml @@ -53,9 +53,6 @@ Erlang programs. Uses trace to file to minimize runtime performance impact, and displays time for calling and called functions.</item> - <tag><em>instrument</em></tag> - <item>Utility functions for obtaining and analysing resource usage - in an instrumented Erlang runtime system.</item> <tag><em>lcnt</em></tag> <item>A lock profiling tool for the Erlang runtime system.</item> <tag><em>make</em></tag> diff --git a/lib/tools/doc/src/ref_man.xml b/lib/tools/doc/src/ref_man.xml index d2131e7a93..6001d2c091 100644 --- a/lib/tools/doc/src/ref_man.xml +++ b/lib/tools/doc/src/ref_man.xml @@ -53,10 +53,6 @@ performance impact, and displays time for calling and called functions.</item> - <tag><em>instrument</em></tag> - <item>Utility functions for obtaining and analysing resource usage - in an instrumented Erlang runtime system.</item> - <tag><em>lcnt</em></tag> <item>A lock profiling tool for the Erlang runtime system.</item> @@ -75,7 +71,6 @@ <xi:include href="eprof.xml"/> <xi:include href="erlang_mode.xml"/> <xi:include href="fprof.xml"/> - <xi:include href="instrument.xml"/> <xi:include href="lcnt.xml"/> <xi:include href="make.xml"/> <xi:include href="tags.xml"/> diff --git a/lib/tools/doc/src/specs.xml b/lib/tools/doc/src/specs.xml index 4f7223e2bc..143b54f0a9 100644 --- a/lib/tools/doc/src/specs.xml +++ b/lib/tools/doc/src/specs.xml @@ -8,6 +8,5 @@ <xi:include href="../specs/specs_tags.xml"/> <xi:include href="../specs/specs_cover.xml"/> <xi:include href="../specs/specs_xref.xml"/> - <xi:include href="../specs/specs_instrument.xml"/> <xi:include href="../specs/specs_erlang_mode.xml"/> </specs> diff --git a/lib/tools/src/Makefile b/lib/tools/src/Makefile index b05ce883ec..44176802fa 100644 --- a/lib/tools/src/Makefile +++ b/lib/tools/src/Makefile @@ -41,7 +41,6 @@ MODULES= \ fprof \ cprof \ lcnt \ - instrument \ make \ tags \ xref \ diff --git a/lib/tools/src/tools.app.src b/lib/tools/src/tools.app.src index f0c7ec1ead..cb8d734459 100644 --- a/lib/tools/src/tools.app.src +++ b/lib/tools/src/tools.app.src @@ -24,7 +24,6 @@ cprof, eprof, fprof, - instrument, lcnt, make, tags, diff --git a/lib/tools/test/Makefile b/lib/tools/test/Makefile index 984568e4c5..7f949defaf 100644 --- a/lib/tools/test/Makefile +++ b/lib/tools/test/Makefile @@ -26,7 +26,6 @@ MODULES = \ emacs_SUITE \ fprof_SUITE \ cprof_SUITE \ - instrument_SUITE \ lcnt_SUITE \ make_SUITE \ tools_SUITE \ diff --git a/system/doc/efficiency_guide/profiling.xml b/system/doc/efficiency_guide/profiling.xml index ebe1a978e4..6ba579d1ed 100644 --- a/system/doc/efficiency_guide/profiling.xml +++ b/system/doc/efficiency_guide/profiling.xml @@ -101,7 +101,7 @@ <p>When looking at memory usage in a running system the most basic function to get information from is <seemfa marker="erts:erlang#memory/0"><c> erlang:memory()</c></seemfa>. It returns the current memory usage - of the system. <seeerl marker="tools:instrument"><c>instrument(3)</c></seeerl> + of the system. <seeerl marker="runtime_tools:instrument"><c>instrument(3)</c></seeerl> can be used to get a more detailed breakdown of where memory is used.</p> <p>Processes, ports and ets tables can then be inspected using their respective info functions, i.e. -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor