diff options
Diffstat (limited to 'lib/observer')
-rw-r--r-- | lib/observer/doc/src/crashdump.xml | 8 | ||||
-rw-r--r-- | lib/observer/doc/src/etop.xml | 14 | ||||
-rw-r--r-- | lib/observer/doc/src/observer.xml | 4 | ||||
-rw-r--r-- | lib/observer/doc/src/ttb.xml | 47 | ||||
-rw-r--r-- | lib/observer/src/cdv_html_wx.erl | 11 | ||||
-rw-r--r-- | lib/observer/src/observer_wx.erl | 6 | ||||
-rw-r--r-- | lib/observer/test/crashdump_helper.erl | 3 | ||||
-rw-r--r-- | lib/observer/test/crashdump_viewer_SUITE.erl | 5 |
8 files changed, 54 insertions, 44 deletions
diff --git a/lib/observer/doc/src/crashdump.xml b/lib/observer/doc/src/crashdump.xml index 48f944cbce..62c6ff1f25 100644 --- a/lib/observer/doc/src/crashdump.xml +++ b/lib/observer/doc/src/crashdump.xml @@ -34,7 +34,7 @@ <rev>PA1</rev> <file>crashdump.xml</file> </header> - <module>crashdump_viewer</module> + <module since="">crashdump_viewer</module> <modulesummary>A WxWidgets based tool for browsing Erlang crashdumps.</modulesummary> <description> @@ -46,8 +46,8 @@ </description> <funcs> <func> - <name>start() -> ok</name> - <name>start(File) -> ok</name> + <name since="">start() -> ok</name> + <name since="OTP 17.0">start(File) -> ok</name> <fsummary>Start the Crashdump Viewer.</fsummary> <type> <v>File = string()</v> @@ -62,7 +62,7 @@ </desc> </func> <func> - <name>stop() -> ok</name> + <name since="">stop() -> ok</name> <fsummary>Terminate the Crashdump Viewer.</fsummary> <desc> <p>Terminates the Crashdump Viewer and closes diff --git a/lib/observer/doc/src/etop.xml b/lib/observer/doc/src/etop.xml index e7a83d0514..f0acc7b5d8 100644 --- a/lib/observer/doc/src/etop.xml +++ b/lib/observer/doc/src/etop.xml @@ -34,7 +34,7 @@ <rev></rev> <file></file> </header> - <module>etop</module> + <module since="">etop</module> <modulesummary>Erlang Top is a tool for presenting information about Erlang processes similar to the information presented by "top" in UNIX.</modulesummary> <description> @@ -98,7 +98,7 @@ </description> <funcs> <func> - <name>start() -> ok</name> + <name since="OTP R15B01">start() -> ok</name> <fsummary>Start etop.</fsummary> <desc> <p>Starts <c>etop</c>. @@ -106,7 +106,7 @@ </desc> </func> <func> - <name>start(Options) -> ok</name> + <name since="OTP R15B01">start(Options) -> ok</name> <fsummary>Start etop.</fsummary> <type> <v>Options = [Option]</v> @@ -120,7 +120,7 @@ </desc> </func> <func> - <name>help() -> ok</name> + <name since="OTP R15B01">help() -> ok</name> <fsummary>Display the etop help.</fsummary> <desc> <p>Displays the help of <c>etop</c> and @@ -128,7 +128,7 @@ </desc> </func> <func> - <name>config(Key,Value) -> Result</name> + <name since="">config(Key,Value) -> Result</name> <fsummary>Change the configuration of the tool.</fsummary> <type> <v>Result = ok | {error,Reason}</v> @@ -142,7 +142,7 @@ </desc> </func> <func> - <name>dump(File) -> Result</name> + <name since="">dump(File) -> Result</name> <fsummary>Dump the current display to a file.</fsummary> <type> <v>Result = ok | {error,Reason}</v> @@ -153,7 +153,7 @@ </desc> </func> <func> - <name>stop() -> stop</name> + <name since="">stop() -> stop</name> <fsummary>Terminate etop.</fsummary> <desc> <p>Terminates <c>etop</c>.</p> diff --git a/lib/observer/doc/src/observer.xml b/lib/observer/doc/src/observer.xml index 843be26ee1..7fb1dd044e 100644 --- a/lib/observer/doc/src/observer.xml +++ b/lib/observer/doc/src/observer.xml @@ -33,7 +33,7 @@ <rev>PA1</rev> <file>observer.xml</file> </header> - <module>observer</module> + <module since="OTP R15B">observer</module> <modulesummary>A GUI tool for observing an Erlang system.</modulesummary> <description> <p>Observer is a graphical tool for observing the characteristics of @@ -48,7 +48,7 @@ </description> <funcs> <func> - <name>start() -> ok</name> + <name since="OTP R15B">start() -> ok</name> <fsummary>Start the Observer GUI.</fsummary> <desc> <p>Starts the Observer GUI. diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml index 7cd15e15d3..fee95e0b21 100644 --- a/lib/observer/doc/src/ttb.xml +++ b/lib/observer/doc/src/ttb.xml @@ -33,7 +33,7 @@ <rev>PA1</rev> <file>ttb.xml</file> </header> - <module>ttb</module> + <module since="">ttb</module> <modulesummary>A base for building trace tools for distributed systems.</modulesummary> <description> <p>The Trace Tool Builder, <c>ttb</c>, is a base for building trace @@ -44,7 +44,7 @@ </description> <funcs> <func> - <name>start_trace(Nodes, Patterns, FlagSpec, Opts) -> Result</name> + <name since="OTP R15B">start_trace(Nodes, Patterns, FlagSpec, Opts) -> Result</name> <fsummary>Start a trace port on each specified node.</fsummary> <type> <v>Result = see p/2</v> @@ -76,7 +76,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>tracer() -> Result</name> + <name since="">tracer() -> Result</name> <fsummary>Equivalent to tracer(node()).</fsummary> <desc> <p>Equivalent to <c>tracer(node())</c>.</p> @@ -84,7 +84,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>tracer(Shortcut) -> Result</name> + <name since="">tracer(Shortcut) -> Result</name> <fsummary>Handy shortcuts for common tracing settings.</fsummary> <type> <v>Shortcut = shell | dbg</v> @@ -97,7 +97,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>tracer(Nodes) -> Result</name> + <name since="">tracer(Nodes) -> Result</name> <fsummary>Equivalent to tracer(Nodes,[]).</fsummary> <desc> <p>Equivalent to <c>tracer(Nodes,[])</c>.</p> @@ -105,7 +105,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>tracer(Nodes,Opts) -> Result</name> + <name since="">tracer(Nodes,Opts) -> Result</name> <fsummary>Start a trace port on each specified node.</fsummary> <type> <v>Result = {ok, ActivatedNodes} | {error,Reason}</v> @@ -243,7 +243,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>p(Item,Flags) -> Return</name> + <name since="">p(Item,Flags) -> Return</name> <fsummary>Set the specified trace flags on the specified processes or ports.</fsummary> <type> <v>Return = {ok,[{Item,MatchDesc}]}</v> @@ -277,7 +277,8 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>tp, tpl, tpe, ctp, ctpl, ctpg, ctpe</name> + <name since="">tp, tpl, ctp, ctpl, ctpg</name> + <name since="OTP 19.0">tpe, ctpe</name> <fsummary>Set and clear trace patterns.</fsummary> <desc> <p>These functions are to be used with trace @@ -338,7 +339,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>list_history() -> History</name> + <name since="">list_history() -> History</name> <fsummary>Return all calls stored in history.</fsummary> <type> <v>History = [{N,Func,Args}]</v> @@ -352,7 +353,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>run_history(N) -> ok | {error, Reason}</name> + <name since="">run_history(N) -> ok | {error, Reason}</name> <fsummary>Execute one entry of the history.</fsummary> <type> <v>N = integer() | [integer()]</v> @@ -364,7 +365,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>write_config(ConfigFile,Config)</name> + <name since="">write_config(ConfigFile,Config)</name> <fsummary>Equivalent to write_config(ConfigFile,Config,[]).</fsummary> <desc> <p>Equivalent to <c>write_config(ConfigFile,Config,[])</c>.</p> @@ -372,7 +373,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>write_config(ConfigFile,Config,Opts) -> ok | {error,Reason}</name> + <name since="">write_config(ConfigFile,Config,Opts) -> ok | {error,Reason}</name> <fsummary>Create a configuration file.</fsummary> <type> <v>ConfigFile = string()</v> @@ -405,7 +406,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>run_config(ConfigFile) -> ok | {error,Reason}</name> + <name since="">run_config(ConfigFile) -> ok | {error,Reason}</name> <fsummary>Execute all entries in a configuration file.</fsummary> <type> <v>ConfigFile = string()</v> @@ -418,7 +419,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>run_config(ConfigFile,NumList) -> ok | {error,Reason}</name> + <name since="">run_config(ConfigFile,NumList) -> ok | {error,Reason}</name> <fsummary>Execute selected entries from a configuration file.</fsummary> <type> <v>ConfigFile = string()</v> @@ -437,7 +438,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>list_config(ConfigFile) -> Config | {error,Reason}</name> + <name since="">list_config(ConfigFile) -> Config | {error,Reason}</name> <fsummary>List all entries in a configuration file.</fsummary> <type> <v>ConfigFile = string()</v> @@ -449,7 +450,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>write_trace_info(Key,Info) -> ok</name> + <name since="">write_trace_info(Key,Info) -> ok</name> <fsummary>Write any information to file <c>.ti</c>.</fsummary> <type> <v>Key = term()</v> @@ -465,7 +466,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>seq_trigger_ms() -> MatchSpec</name> + <name since="">seq_trigger_ms() -> MatchSpec</name> <fsummary>Equivalent to seq_trigger_ms(all).</fsummary> <desc> <p>Equivalent to <c>seq_trigger_ms(all)</c>.</p> @@ -473,7 +474,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>seq_trigger_ms(Flags) -> MatchSpec</name> + <name since="">seq_trigger_ms(Flags) -> MatchSpec</name> <fsummary>Return a match_spec() which starts sequential tracing.</fsummary> <type> <v>MatchSpec = match_spec()</v> @@ -521,7 +522,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>stop()</name> + <name since="">stop()</name> <fsummary>Equivalent to stop([]).</fsummary> <desc> <p>Equivalent to <c>stop([])</c>.</p> @@ -529,7 +530,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>stop(Opts) -> stopped | {stopped, Dir}</name> + <name since="">stop(Opts) -> stopped | {stopped, Dir}</name> <fsummary>Stop tracing and fetch/format logs from all nodes.</fsummary> <type> <v>Opts = Opt | [Opt]</v> @@ -573,7 +574,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>get_et_handler()</name> + <name since="OTP R15B">get_et_handler()</name> <fsummary>Return the <c>et</c> handler.</fsummary> <desc> <p>Returns the <c>et</c> handler, which can be used with <c>format/2</c> @@ -583,7 +584,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>format(File)</name> + <name since="">format(File)</name> <fsummary>Equivalent to <c>format(File,[])</c>.</fsummary> <desc> <p>Equivalent to <c>format(File,[])</c>.</p> @@ -591,7 +592,7 @@ ttb:p(all, call).</input></pre> </func> <func> - <name>format(File,Options) -> ok | {error, Reason}</name> + <name since="">format(File,Options) -> ok | {error, Reason}</name> <fsummary>Format a binary trace log.</fsummary> <type> <v>File = string() | [string()]</v> diff --git a/lib/observer/src/cdv_html_wx.erl b/lib/observer/src/cdv_html_wx.erl index ffef83227c..8956173c93 100644 --- a/lib/observer/src/cdv_html_wx.erl +++ b/lib/observer/src/cdv_html_wx.erl @@ -79,14 +79,14 @@ handle_info(active, #state{panel=HtmlWin,delayed_fetch=Callback}=State) observer_lib:sync_destroy_progress_dialog(), wx_misc:beginBusyCursor(), wxHtmlWindow:setPage(HtmlWin,HtmlText), - cdv_wx:set_status(TW), + cdv_wx_set_status(State, TW), wx_misc:endBusyCursor(), {noreply, State#state{expand_table=Tab, delayed_fetch=undefined, trunc_warn=TW}}; handle_info(active, State) -> - cdv_wx:set_status(State#state.trunc_warn), + cdv_wx_set_status(State, State#state.trunc_warn), {noreply, State}; handle_info(Info, State) -> @@ -164,3 +164,10 @@ expand(Id,Callback,#state{expand_wins=Opened0, app=App}=State) -> Opened0 end, State#state{expand_wins=Opened}. + +cdv_wx_set_status(#state{app = cdv}, Status) -> + %% this module is used by the observer when cdw_wx isn't started + %% only try to set status when used by cdv + cdv_wx:set_status(Status); +cdv_wx_set_status(_, _) -> + ok. diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl index 453e3bdc2d..fe51afa240 100644 --- a/lib/observer/src/observer_wx.erl +++ b/lib/observer/src/observer_wx.erl @@ -771,7 +771,11 @@ ensure_sasl_started(Node) -> ensure_mf_h_handler_used(Node) -> %% is log_mf_h used ? - Handlers = rpc:block_call(Node, gen_event, which_handlers, [error_logger]), + Handlers = + case rpc:block_call(Node, gen_event, which_handlers, [error_logger]) of + {badrpc,{'EXIT',noproc}} -> []; % OTP-21+ and no event handler exists + Hs -> Hs + end, case lists:any(fun(L)-> L == log_mf_h end, Handlers) of false -> throw("Error: log_mf_h handler not used in sasl."), error; diff --git a/lib/observer/test/crashdump_helper.erl b/lib/observer/test/crashdump_helper.erl index d5d3649525..d6b5eff9b5 100644 --- a/lib/observer/test/crashdump_helper.erl +++ b/lib/observer/test/crashdump_helper.erl @@ -204,5 +204,4 @@ dump_persistent_terms() -> create_persistent_terms() -> persistent_term:put({?MODULE,first}, {pid,42.0}), persistent_term:put({?MODULE,second}, [1,2,3]), - persistent_term:get(). - + {persistent_term:get({?MODULE,first}),persistent_term:get({?MODULE,second})}. diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl index 8c5e618f4a..31cf7011d4 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -615,9 +615,8 @@ special(File,Procs) -> #proc{dict=Dict} = ProcDetails, %% io:format("~p\n", [Dict]), - Pts1 = crashdump_helper:create_persistent_terms(), - Pts2 = proplists:get_value(pts,Dict), - true = lists:sort(Pts1) =:= lists:sort(Pts2), + Pts = crashdump_helper:create_persistent_terms(), + Pts = proplists:get_value(pts,Dict), io:format(" persistent terms ok",[]), ok; _ -> |