From afb632d2028fdc4a37e10e41e1929264ff59f52e Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 14 Mar 2013 09:53:33 +0100 Subject: Convert XML files to UTF-8, where needed --- lib/et/doc/src/notes.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 8d9675b801..39cf28dbff 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -1,4 +1,4 @@ - + @@ -59,7 +59,7 @@

- Fix typo in ET doc (Thanks to Ricardo Catalinas Jiménez)

+ Fix typo in ET doc (Thanks to Ricardo Catalinas Jiménez)

Own Id: OTP-10119

-- cgit v1.2.3 From e5875001247e6a6ac4f474157a51a8c54f94ae49 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 14 Mar 2013 16:01:25 +0100 Subject: Convert XML files to UTF-8 --- lib/et/doc/src/book.xml | 4 ++-- lib/et/doc/src/et.xml | 4 ++-- lib/et/doc/src/et_collector.xml | 4 ++-- lib/et/doc/src/et_desc.xmlsrc | 4 ++-- lib/et/doc/src/et_examples.xmlsrc | 4 ++-- lib/et/doc/src/et_intro.xml | 4 ++-- lib/et/doc/src/et_selector.xml | 4 ++-- lib/et/doc/src/et_tutorial.xmlsrc | 4 ++-- lib/et/doc/src/et_viewer.xml | 4 ++-- lib/et/doc/src/notes.xml | 2 +- lib/et/doc/src/part.xml | 4 ++-- lib/et/doc/src/ref_man.xml | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/book.xml b/lib/et/doc/src/book.xml index 222fbda046..6c78f2ca07 100644 --- a/lib/et/doc/src/book.xml +++ b/lib/et/doc/src/book.xml @@ -1,10 +1,10 @@ - +
- 20022009 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et.xml b/lib/et/doc/src/et.xml index 5e3453c348..f1f74df1b1 100644 --- a/lib/et/doc/src/et.xml +++ b/lib/et/doc/src/et.xml @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_collector.xml b/lib/et/doc/src/et_collector.xml index e9885dcbb3..8b4592ac63 100644 --- a/lib/et/doc/src/et_collector.xml +++ b/lib/et/doc/src/et_collector.xml @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_desc.xmlsrc b/lib/et/doc/src/et_desc.xmlsrc index c02517ae01..e4bfed2062 100644 --- a/lib/et/doc/src/et_desc.xmlsrc +++ b/lib/et/doc/src/et_desc.xmlsrc @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_examples.xmlsrc b/lib/et/doc/src/et_examples.xmlsrc index 7678184515..3bd95bcb06 100644 --- a/lib/et/doc/src/et_examples.xmlsrc +++ b/lib/et/doc/src/et_examples.xmlsrc @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_intro.xml b/lib/et/doc/src/et_intro.xml index f90a6d2b5c..62cc291d4c 100644 --- a/lib/et/doc/src/et_intro.xml +++ b/lib/et/doc/src/et_intro.xml @@ -1,10 +1,10 @@ - +
- 20022012 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_selector.xml b/lib/et/doc/src/et_selector.xml index 34203306bb..72392fdfe4 100644 --- a/lib/et/doc/src/et_selector.xml +++ b/lib/et/doc/src/et_selector.xml @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_tutorial.xmlsrc b/lib/et/doc/src/et_tutorial.xmlsrc index 1337af76d1..02c303f66e 100644 --- a/lib/et/doc/src/et_tutorial.xmlsrc +++ b/lib/et/doc/src/et_tutorial.xmlsrc @@ -1,10 +1,10 @@ - +
- 20092011 + 20092013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_viewer.xml b/lib/et/doc/src/et_viewer.xml index d4cfbdfa31..695725f281 100644 --- a/lib/et/doc/src/et_viewer.xml +++ b/lib/et/doc/src/et_viewer.xml @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 39cf28dbff..7557c31851 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -1,4 +1,4 @@ - + diff --git a/lib/et/doc/src/part.xml b/lib/et/doc/src/part.xml index 627aee866d..7048e3a401 100644 --- a/lib/et/doc/src/part.xml +++ b/lib/et/doc/src/part.xml @@ -1,10 +1,10 @@ - +
- 20022010 + 20022013 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/ref_man.xml b/lib/et/doc/src/ref_man.xml index 344b4fabed..47706339b6 100644 --- a/lib/et/doc/src/ref_man.xml +++ b/lib/et/doc/src/ref_man.xml @@ -1,10 +1,10 @@ - +
- 20022009 + 20022013 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From d7ce2d9b68ba83e46100a97aaf56c0ca09899525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 6 Sep 2013 10:03:56 +0200 Subject: Convert some notes.xml files from latin-1 to utf-8 In the master branch, the encoding for most xml files have been changed from latin-1 to utf-8. The problem is, that the corresponding files in the maint branch still are encoded in latin-1, and that a merge from maint to master may bring in characters encoded in latin-1 into a notes.xml file declared to be in utf-8. To fix the problem once and for all (for the files involved), we'll need to re-encode the files files utf-8 in maint, and then merge to master. Noticed-by: Magnus Henoch --- lib/et/doc/src/notes.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index d45d0a89bf..a34dd4a541 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -1,4 +1,4 @@ - + @@ -43,7 +43,7 @@

Use erlang:demonitor(Ref, [flush]) where applicable. - Thanks to Loïc Hoguin.

+ Thanks to Loïc Hoguin.

Own Id: OTP-11039

@@ -82,7 +82,7 @@

- Fix typo in ET doc (Thanks to Ricardo Catalinas Jiménez)

+ Fix typo in ET doc (Thanks to Ricardo Catalinas Jiménez)

Own Id: OTP-10119

-- cgit v1.2.3 From 20641fe0f2ea745873fc7557448d3a7deb1bd639 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 16 Sep 2013 20:11:53 +0200 Subject: Prepare release --- lib/et/doc/src/notes.xml | 17 +++++++++++++++++ lib/et/vsn.mk | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index a34dd4a541..815dfada5e 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -36,6 +36,23 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

+
ET 1.4.4.5 + +
Improvements and New Features + + +

+ The encoding of the notes.xml file has been + changed from latin1 to utf-8 to avoid future merge + problems.

+

+ Own Id: OTP-11310

+
+
+
+ +
+
ET 1.4.4.4
Improvements and New Features diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index 40cdc2b298..282991aa49 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.4.4.4 +ET_VSN = 1.4.4.5 -- cgit v1.2.3 From 918a6182f99441d6f864a330eee561ead6ce834a Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 11 Nov 2013 13:11:58 +0100 Subject: Remove gs parts --- lib/et/src/Makefile | 5 +- lib/et/src/et.app.src | 4 +- lib/et/src/et_collector.erl | 2 - lib/et/src/et_gs_contents_viewer.erl | 602 -------------- lib/et/src/et_gs_viewer.erl | 1498 ---------------------------------- lib/et/src/et_viewer.erl | 19 +- lib/et/src/modules.mk | 4 +- 7 files changed, 7 insertions(+), 2127 deletions(-) delete mode 100644 lib/et/src/et_gs_contents_viewer.erl delete mode 100644 lib/et/src/et_gs_viewer.erl (limited to 'lib/et') diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile index 386169fe95..377e593712 100644 --- a/lib/et/src/Makefile +++ b/lib/et/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2000-2012. All Rights Reserved. +# Copyright Ericsson AB 2000-2013. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -127,15 +127,12 @@ $(EBIN)/et_selector.$(EMULATOR): et_selector.erl ../include/et.hrl $(EBIN)/et_contents_viewer.$(EMULATOR): et_contents_viewer.erl ../include/et.hrl et_internal.hrl -$(EBIN)/et_gs_contents_viewer.$(EMULATOR): et_gs_contents_viewer.erl ../include/et.hrl et_internal.hrl $(EBIN)/et_wx_contents_viewer.$(EMULATOR): et_wx_contents_viewer.erl ../include/et.hrl et_internal.hrl $(EBIN)/et_collector.$(EMULATOR): et_collector.erl ../include/et.hrl et_internal.hrl $(EBIN)/et_viewer.$(EMULATOR): et_viewer.erl ../include/et.hrl et_internal.hrl -$(EBIN)/et_gs_viewer.$(EMULATOR): et_gs_viewer.erl ../include/et.hrl et_internal.hrl - $(EBIN)/et_wx_viewer.$(EMULATOR): et_wx_viewer.erl ../include/et.hrl et_internal.hrl diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src index fd203e3e44..f7189a4197 100644 --- a/lib/et/src/et.app.src +++ b/lib/et/src/et.app.src @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2010. All Rights Reserved. +%% Copyright Ericsson AB 2002-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -24,8 +24,6 @@ [ et, et_collector, - et_gs_contents_viewer, - et_gs_viewer, et_selector, et_viewer, et_wx_contents_viewer, diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl index a78b30c419..e05c67be60 100644 --- a/lib/et/src/et_collector.erl +++ b/lib/et/src/et_collector.erl @@ -409,8 +409,6 @@ report(TH, TraceOrEvent) when is_record(TH, table_handle) -> report(TH#table_handle.collector_pid, TraceOrEvent) end end; -report(TH, end_of_trace) when is_record(TH, table_handle) -> - {ok, TH}; report(_, Bad) -> exit({bad_event, Bad}). diff --git a/lib/et/src/et_gs_contents_viewer.erl b/lib/et/src/et_gs_contents_viewer.erl deleted file mode 100644 index 2d414f10b4..0000000000 --- a/lib/et/src/et_gs_contents_viewer.erl +++ /dev/null @@ -1,602 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2000-2012. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% -%%---------------------------------------------------------------------- -%% Purpose: Displays details of a trace event -%%---------------------------------------------------------------------- - --module(et_gs_contents_viewer). --compile([{nowarn_deprecated_function,{gs,config,2}}, - {nowarn_deprecated_function,{gs,destroy,1}}, - {nowarn_deprecated_function,{gs,editor,2}}, - {nowarn_deprecated_function,{gs,frame,2}}, - {nowarn_deprecated_function,{gs,menu,2}}, - {nowarn_deprecated_function,{gs,menubar,2}}, - {nowarn_deprecated_function,{gs,menubutton,2}}, - {nowarn_deprecated_function,{gs,menuitem,2}}, - {nowarn_deprecated_function,{gs,menuitem,3}}, - {nowarn_deprecated_function,{gs,start,0}}, - {nowarn_deprecated_function,{gs,window,2}}]). - --behaviour(gen_server). - -%% External exports --export([start_link/1, - stop/1]). - -%% gen_server callbacks --export([init/1, terminate/2, code_change/3, - handle_call/3, handle_cast/2, handle_info/2]). - --include("../include/et.hrl"). --include("et_internal.hrl"). - --record(state, {parent_pid, % Pid of parent process - viewer_pid, % Pid of viewer process - event_order, % Field to be used as primary key - event, % The original event - filtered_event, % Event processed by active filter - active_filter, % Name of the active filter - filters, % List of possible filters - win, % GUI: Window object - packer, % GUI: Packer object - width, % GUI: Window width - height}). % GUI: Window height - -%%%---------------------------------------------------------------------- -%%% Client side -%%%---------------------------------------------------------------------- - -%%---------------------------------------------------------------------- -%% start_link(Options) -> {ok, ContentsPid} | {error, Reason} -%% -%% Start an viewer for the event contents as window in GS -%% -%% Options = [option()] -%% -%% option() = -%% -%% {parent_pid, pid()} | % Pid of parent process -%% {viewer_pid, pid()} | % Pid of viewer process -%% {event_order, event_order()} | % Field to be used as primary key -%% {active_filter, atom()} | % Name of the active filter -%% {filter, atom(), fun()} % A named filter fun -%% -%% event_order() = 'trace_ts' | 'event_ts' -%% ContentsPid = pid() -%% Reason = term() -%%---------------------------------------------------------------------- - -start_link(Options) -> - case parse_opt(Options, default_state()) of - {ok, S} -> - case gen_server:start_link(?MODULE, [S], []) of - {ok, ContentsPid} when S#state.parent_pid =/= self() -> - unlink(ContentsPid), - {ok, ContentsPid}; - Other -> - Other - end; - {error, Reason} -> - {error, Reason} - end. - -default_state() -> - #state{parent_pid = self(), - viewer_pid = undefined, - active_filter = ?DEFAULT_FILTER_NAME, - filters = [?DEFAULT_FILTER], - width = 600, - height = 300}. - -parse_opt([], S) -> - Name = S#state.active_filter, - Filters = S#state.filters, - if - S#state.event =:= undefined -> - {error, {badarg, no_event}}; - is_atom(Name) -> - case lists:keysearch(Name, #filter.name, Filters) of - {value, F} when is_record(F, filter) -> - {ok, S#state{active_filter = Name}}; - false -> - {error, {badarg, {no_such_filter, Name, Filters}}} - end - end; -parse_opt([H | T], S) -> - case H of - {parent_pid, ParentPid} when is_pid(ParentPid) -> - parse_opt(T, S#state{parent_pid = ParentPid}); - {viewer_pid, ViewerPid} when is_pid(ViewerPid) -> - parse_opt(T, S#state{viewer_pid = ViewerPid}); - {event_order, trace_ts} -> - parse_opt(T, S#state{event_order = trace_ts}); - {event_order, event_ts} -> - parse_opt(T, S#state{event_order = event_ts}); - {event, Event} when is_record(Event, event) -> - parse_opt(T, S#state{event = Event}); - {active_filter, Name} when is_atom(Name) -> - parse_opt(T, S#state{active_filter = Name}); - F when is_record(F, filter), - is_atom(F#filter.name), - is_function(F#filter.function) -> - Filters = lists:keydelete(F#filter.name, #filter.name, S#state.filters), - Filters2 = lists:keysort(#filter.name, [F | Filters]), - parse_opt(T, S#state{filters = Filters2}); - {width, Width} when is_integer(Width), Width > 0 -> - parse_opt(T, S#state{width = Width}); - {height, Height} when is_integer(Height), Height > 0 -> - parse_opt(T, S#state{height = Height}); - Bad -> - {error, {bad_option, Bad}} - end; -parse_opt(BadList, _S) -> - {error, {bad_option_list, BadList}}. - -%%---------------------------------------------------------------------- -%% stop(ContentsPid) -> ok -%% -%% Stops a contents viewer process -%% -%% ContentsPid = pid() -%%---------------------------------------------------------------------- - -stop(ContentsPid) -> - unlink(ContentsPid), - call(ContentsPid, stop). - -call(ContentsPid, Request) -> - gen_server:call(ContentsPid, Request, infinity). - -%%%---------------------------------------------------------------------- -%%% Callback functions from gen_server -%%%---------------------------------------------------------------------- - -%%---------------------------------------------------------------------- -%% Func: init/1 -%% Returns: {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%%---------------------------------------------------------------------- - -init([S]) when is_record(S, state) -> - process_flag(trap_exit, true), - S2 = create_window(S), - {ok, S2}. - -%%---------------------------------------------------------------------- -%% Func: handle_call/3 -%% Returns: {reply, Reply, State} | -%% {reply, Reply, State, Timeout} | -%% {noreply, State} | -%% {noreply, State, Timeout} | -%% {stop, Reason, Reply, State} | (terminate/2 is called) -%% {stop, Reason, State} (terminate/2 is called) -%%---------------------------------------------------------------------- - -handle_call(stop, _From, S) -> - unlink(S#state.parent_pid), - {stop, shutdown, ok, S}; -handle_call(Request, From, S) -> - ok = error_logger:format("~p(~p): handle_call(~p, ~p, ~p)~n", - [?MODULE, self(), Request, From, S]), - Reply = {error, {bad_request, Request}}, - {reply, Reply, S}. - -%%---------------------------------------------------------------------- -%% Func: handle_cast/2 -%% Returns: {noreply, State} | -%% {noreply, State, Timeout} | -%% {stop, Reason, State} (terminate/2 is called) -%%---------------------------------------------------------------------- - -handle_cast(Msg, S) -> - ok = error_logger:format("~p(~p): handle_cast(~p, ~p)~n", - [?MODULE, self(), Msg, S]), - {noreply, S}. - -%%---------------------------------------------------------------------- -%% Func: handle_info/2 -%% Returns: {noreply, State} | -%% {noreply, State, Timeout} | -%% {stop, Reason, State} (terminate/2 is called) -%%---------------------------------------------------------------------- - -handle_info({gs, Button, click, Data, _Other}, S) -> - case Button of - close -> - gs:destroy(S#state.win), - {stop, normal, S}; - save -> - Event = S#state.event, - Bin = list_to_binary(event_to_string(Event, S#state.event_order)), - TimeStamp = - case S#state.event_order of - trace_ts -> Event#event.trace_ts; - event_ts -> Event#event.event_ts - end, - FileName = ["et_contents_viewer_", now_to_string(TimeStamp), ".save"], - file:write_file(lists:flatten(FileName), Bin), - {noreply, S}; - _PopupMenuItem when is_record(Data, filter) -> - F = Data, - ChildState= S#state{active_filter = F#filter.name}, - case gen_server:start_link(?MODULE, [ChildState], []) of - {ok, Pid} when S#state.parent_pid =/= self() -> - unlink(Pid), - {noreply, S}; - _ -> - {noreply, S} - end; - {hide, Actors} -> - send_viewer_event(S, {delete_actors, Actors}), - {noreply, S}; - {show, Actors} -> - send_viewer_event(S, {insert_actors, Actors}), - {noreply, S}; - {mode, Mode} -> - send_viewer_event(S, {mode, Mode}), - {noreply, S}; - Nyi -> - ok = error_logger:format("~p: click ~p ignored (nyi)~n", - [?MODULE, Nyi]), - {noreply, S} - end; -handle_info({gs, _Obj, destroy,_, _}, S) -> - unlink(S#state.parent_pid), - gs:destroy(S#state.win), - {stop, normal, S}; -handle_info({gs, _Obj, keypress, _, [KeySym, _Keycode, _Shift, _Control | _]}, S) -> - case KeySym of - 'c' -> - gs:destroy(S#state.win), - {stop, normal, S}; - - 'f' -> - E = S#state.filtered_event, - From = E#event.from, - send_viewer_event(S, {delete_actors, [From]}), - {noreply, S}; - 't' -> - E = S#state.filtered_event, - To = E#event.to, - send_viewer_event(S, {delete_actors, [To]}), - {noreply, S}; - 'b' -> - E = S#state.filtered_event, - From = E#event.from, - To = E#event.to, - send_viewer_event(S, {delete_actors, [From, To]}), - {noreply, S}; - - 'F' -> - E = S#state.filtered_event, - From = E#event.from, - send_viewer_event(S, {insert_actors, [From]}), - {noreply, S}; - 'T' -> - E = S#state.filtered_event, - To = E#event.to, - send_viewer_event(S, {insert_actors, [To]}), - {noreply, S}; - 'B' -> - E = S#state.filtered_event, - From = E#event.from, - To = E#event.to, - send_viewer_event(S, {insert_actors, [From, To]}), - {noreply, S}; - - 's' -> - E = S#state.filtered_event, - From = E#event.from, - To = E#event.to, - First = et_collector:make_key(S#state.event_order, E), - Mode = {search_actors, forward, First, [From, To]}, - send_viewer_event(S, {mode, Mode}), - {noreply, S}; - 'r' -> - E = S#state.filtered_event, - From = E#event.from, - To = E#event.to, - First = et_collector:make_key(S#state.event_order, E), - Mode = {search_actors, reverse, First, [From, To]}, - send_viewer_event(S, {mode, Mode}), - {noreply, S}; - 'a' -> - send_viewer_event(S, {mode, all}), - {noreply, S}; - - 0 -> - case lists:keysearch(?DEFAULT_FILTER_NAME, #filter.name, S#state.filters) of - {value, F} when is_record(F, filter) -> - ChildState= S#state{active_filter = F#filter.name}, - case gen_server:start_link(?MODULE, [ChildState], []) of - {ok, Pid} when S#state.parent_pid =/= self() -> - unlink(Pid); - _ -> - ignore - end; - false -> - ignore - end, - {noreply, S}; - Int when is_integer(Int), Int > 0, Int =< 9 -> - case catch lists:nth(Int, S#state.filters) of - F when is_record(F, filter) -> - ChildState= S#state{active_filter = F#filter.name}, - case gen_server:start_link(?MODULE, [ChildState], []) of - {ok, Pid} when S#state.parent_pid =/= self() -> - unlink(Pid); - _ -> - ignore - end; - {'EXIT', _} -> - ignore - end, - {noreply, S}; - - 'Shift_L' -> - {noreply, S}; - 'Shift_R' -> - {noreply, S}; - 'Caps_Lock' -> - {noreply, S}; - _ -> - io:format("~p: ignored: ~p~n", [?MODULE, KeySym]), - {noreply, S} - end; -handle_info({gs, _Obj, configure, [], [W, H | _]}, S) -> - gs:config(S#state.packer, [{width, W},{height, H}]), - S2 = S#state{width = W, height = H}, - {noreply, S2}; -handle_info({'EXIT', Pid, Reason}, S) -> - if - Pid =:= S#state.parent_pid -> - unlink(Pid), - {stop, Reason, S}; - true -> - {noreply, S} - end; -handle_info(Info, S) -> - ok = error_logger:format("~p(~p): handle_info(~p, ~p)~n", - [?MODULE, self(), Info, S]), - {noreply, S}. - -%%---------------------------------------------------------------------- -%% Func: terminate/2 -%% Purpose: Shutdown the server -%% Returns: any (ignored by gen_server) -%%---------------------------------------------------------------------- - -terminate(_Reason, _S) -> - ignore. - -%%---------------------------------------------------------------------- -%% Func: code_change/3 -%% Purpose: Convert process state when code is changed -%% Returns: {ok, NewState} -%%---------------------------------------------------------------------- - -code_change(_OldVsn, S, _Extra) -> - {ok, S}. - -%%%---------------------------------------------------------------------- -%%% Handle graphics -%%%---------------------------------------------------------------------- - -create_window(S) -> - H = S#state.height, - W = S#state.width, - Name = S#state.active_filter, - Title = lists:concat([?MODULE, " (filter: ", Name, ")"]), - WinOpt = [{title, Title}, {configure, true}, - {width, W}, {height, H}], - GS = gs:start(), - Win = gs:window(GS, WinOpt), - Bar = gs:menubar(Win, []), - create_file_menu(Bar), - PackerOpt = [{packer_x, [{stretch, 1}]}, - {packer_y, [{stretch, 1}, {fixed, 25}]}, - {x, 0}, {y, 25}], - Packer = gs:frame(Win, PackerOpt), - EditorOpt = [{pack_xy, {1, 1}}, {vscroll, right}, {hscroll, bottom}, - {wrap, none}, - {bg, lightblue}, {font, {courier, 12}}], - Editor = gs:editor(Packer, EditorOpt), - FilteredEvent = config_editor(Editor, S), - S2 = S#state{win = Win, packer = Packer, filtered_event = FilteredEvent}, - create_hide_menu(Bar, S2), - create_search_menu(Bar, S2), - create_filter_menu(Bar, S#state.filters), - gs:config(Packer, [{width, W}, {height, H}]), - gs:config(Win, [{map,true}, {keypress, true}]), - S2. - -create_file_menu(Bar) -> - Button = gs:menubutton(Bar, [{label, {text, "File"}}]), - Menu = gs:menu(Button, []), - gs:menuitem(close, Menu, [{label, {text,"Close (c)"}}]), - gs:menuitem(save, Menu, [{label, {text,"Save"}}]). - -create_filter_menu(Bar, Filters) -> - Button = gs:menubutton(Bar, [{label, {text, "Filters"}}]), - Menu = gs:menu(Button, []), - gs:menuitem(Menu, [{label, {text, "Select Filter"}}, {bg, lightblue}, {enable, false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - Item = fun(F, N) when F#filter.name =:= ?DEFAULT_FILTER_NAME-> - Label = lists:concat([pad_string(F#filter.name, 20), "(0)"]), - gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]), - N + 1; - (F, N) -> - Name = F#filter.name, - Label = lists:concat([pad_string(Name, 20), "(", N, ")"]), - gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]), - N + 1 - end, - Filters2 = lists:keysort(#filter.name, Filters), - lists:foldl(Item, 1, Filters2), - Menu. - -create_hide_menu(Bar, S) -> - Button = gs:menubutton(Bar, [{label, {text, "Hide"}}]), - Menu = gs:menu(Button, []), - E = S#state.filtered_event, - From = E#event.from, - To = E#event.to, - if - S#state.viewer_pid =:= undefined -> - ignore; - From =:= To -> - gs:menuitem(Menu, [{label, {text, "Hide actor in Viewer "}}, {bg, lightblue}, {enable, false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem({hide, [From]}, Menu, [{label, {text,"From=To (f|t|b)"}}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(Menu, [{label, {text, "Show actor in Viewer "}}, {bg, lightblue}, {enable, false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem({show, [From]}, Menu, [{label, {text,"From=To (F|T|B)"}}]); - true -> - gs:menuitem(Menu, [{label, {text, "Hide actor in Viewer "}}, {bg, lightblue}, {enable, false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem({hide, [From]}, Menu, [{label, {text,"From (f)"}}]), - gs:menuitem({hide, [To]}, Menu, [{label, {text,"To (t)"}}]), - gs:menuitem({hide, [From, To]}, Menu, [{label, {text,"Both (b)"}}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(Menu, [{label, {text, "Show actor in Viewer "}}, {bg, lightblue}, {enable, false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem({show, [From]}, Menu, [{label, {text,"From (F)"}}]), - gs:menuitem({show, [To]}, Menu, [{label, {text,"To (T)"}}]), - gs:menuitem({show, [From, To]}, Menu, [{label, {text,"Both (B)"}}]) - end. - -create_search_menu(Bar, S) -> - Button = gs:menubutton(Bar, [{label, {text, "Search"}}]), - Menu = gs:menu(Button, []), - E = S#state.filtered_event, - From = E#event.from, - To = E#event.to, - gs:menuitem(Menu, [{label, {text, "Search in Viewer "}}, - {bg, lightblue}, {enable, false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - if - S#state.viewer_pid =:= undefined -> - S; - From =:= To -> - Key = et_collector:make_key(S#state.event_order, E), - ModeS = {search_actors, forward, Key, [From]}, - ModeR = {search_actors, reverse, Key, [From]}, - gs:menuitem({mode, ModeS}, Menu, [{label, {text,"Forward from this event (s)"}}]), - gs:menuitem({mode, ModeR}, Menu, [{label, {text,"Reverse from this event (r)"}}]); - true -> - Key = et_collector:make_key(S#state.event_order, E), - ModeS = {search_actors, forward, Key, [From, To]}, - ModeR = {search_actors, reverse, Key, [From, To]}, - gs:menuitem({mode, ModeS}, Menu, [{label, {text,"Forward from this event (s)"}}]), - gs:menuitem({mode, ModeR}, Menu, [{label, {text,"Reverse from this event (r)"}}]) - end, - gs:menuitem({mode, all}, Menu, [{label, {text,"Abort search. Display all (a)"}}]). - -config_editor(Editor, S) -> - Event = S#state.event, - Name = S#state.active_filter, - {value, F} = lists:keysearch(Name, #filter.name, S#state.filters), - FilterFun = F#filter.function, - case catch FilterFun(Event) of - true -> - do_config_editor(Editor, Event, lightblue, S#state.event_order); - {true, Event2} when is_record(Event2, event) -> - do_config_editor(Editor, Event2, lightblue, S#state.event_order); - false -> - do_config_editor(Editor, Event, red, S#state.event_order); - Bad -> - Contents = {bad_filter, Name, Bad}, - BadEvent = Event#event{contents = Contents}, - do_config_editor(Editor, BadEvent, red, S#state.event_order) - end. - -do_config_editor(Editor, Event, Colour, TsKey) -> - String = event_to_string(Event, TsKey), - gs:config(Editor, {insert, {'end', String}}), - gs:config(Editor, {enable, false}), - gs:config(Editor, {bg, Colour}), - Event. - -%%%---------------------------------------------------------------------- -%%% String handling -%%%---------------------------------------------------------------------- - -term_to_string(Term) -> - case catch io_lib:format("~s", [Term]) of - {'EXIT', _} -> io_lib:format("~p", [Term]); - GoodString -> GoodString - end. - -now_to_string({Mega, Sec, Micro} = Now) - when is_integer(Mega), is_integer(Sec), is_integer(Micro) -> - {{Y, Mo, D}, {H, Mi, S}} = calendar:now_to_universal_time(Now), - lists:concat([Y, "-", Mo, "-", D, " ", H, ".", Mi, ".", S, ".", Micro]); -now_to_string(Other) -> - term_to_string(Other). - -event_to_string(Event, TsKey) -> - ReportedTs = Event#event.trace_ts, - ParsedTs = Event#event.event_ts, - Deep = - ["DETAIL LEVEL: ", term_to_string(Event#event.detail_level), - "\nLABEL: ", term_to_string(Event#event.label), - case Event#event.from =:= Event#event.to of - true -> - ["\nACTOR: ", term_to_string(Event#event.from)]; - false -> - ["\nFROM: ", term_to_string(Event#event.from), - "\nTO: ", term_to_string(Event#event.to)] - end, - case ReportedTs =:= ParsedTs of - true -> - ["\nPARSED: ", now_to_string(ParsedTs)]; - false -> - case TsKey of - trace_ts -> - ["\nTRACE_TS: ", now_to_string(ReportedTs), - "\nEVENT_TS: ", now_to_string(ParsedTs)]; - event_ts -> - ["\nEVENT_TS: ", now_to_string(ParsedTs), - "\nTRACE_TS: ", now_to_string(ReportedTs)] - end - end, - "\nCONTENTS:\n\n", term_to_string(Event#event.contents)], - lists:flatten(Deep). - -pad_string(Atom, MinLen) when is_atom(Atom) -> - pad_string(atom_to_list(Atom), MinLen); -pad_string(String, MinLen) when is_integer(MinLen), MinLen >= 0 -> - Len = length(String), - case Len >= MinLen of - true -> - String; - false -> - String ++ lists:duplicate(MinLen - Len, $ ) - end. - -send_viewer_event(S, Event) -> - case S#state.viewer_pid of - ViewerPid when is_pid(ViewerPid) -> - ViewerPid ! {et, Event}; - undefined -> - ignore - end. diff --git a/lib/et/src/et_gs_viewer.erl b/lib/et/src/et_gs_viewer.erl deleted file mode 100644 index ce8634d09f..0000000000 --- a/lib/et/src/et_gs_viewer.erl +++ /dev/null @@ -1,1498 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2009-2012. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% -%%---------------------------------------------------------------------- -%% Purpose: Displays a sequence chart for trace events (messages/actions) -%%---------------------------------------------------------------------- - --module(et_gs_viewer). --compile([{nowarn_deprecated_function,{gs,canvas,2}}, - {nowarn_deprecated_function,{gs,checkbutton,3}}, - {nowarn_deprecated_function,{gs,config,2}}, - {nowarn_deprecated_function,{gs,destroy,1}}, - {nowarn_deprecated_function,{gs,frame,2}}, - {nowarn_deprecated_function,{gs,line,2}}, - {nowarn_deprecated_function,{gs,menu,2}}, - {nowarn_deprecated_function,{gs,menu,3}}, - {nowarn_deprecated_function,{gs,menubar,2}}, - {nowarn_deprecated_function,{gs,menubutton,2}}, - {nowarn_deprecated_function,{gs,menubutton,3}}, - {nowarn_deprecated_function,{gs,menuitem,2}}, - {nowarn_deprecated_function,{gs,menuitem,3}}, - {nowarn_deprecated_function,{gs,scale,2}}, - {nowarn_deprecated_function,{gs,start,0}}, - {nowarn_deprecated_function,{gs,text,2}}, - {nowarn_deprecated_function,{gs,window,2}}]). - --behaviour(gen_server). - -%% External exports --export([start_link/1]). - -%% gen_server callbacks --export([init/1, terminate/2, code_change/3, - handle_call/3, handle_cast/2, handle_info/2]). - --include("../include/et.hrl"). --include("et_internal.hrl"). - --define(unknown, "UNKNOWN"). - --record(state, - {parent_pid, % Pid of parent process - collector_pid, % Pid of collector process - event_order, % Field to be used as primary key - trace_pattern, % Collector trace pattern - active_filter, % Name of the active filter - filters, % List of possible filters - selected_actor, % Actor selected by user - first_event, % Key of first event (regardless of visibility) - last_event, % Key of last event (regardless of visibility) - max_events, % Maximum number of shown events - events, % Queue containg all event keys (regardless of visibility) - max_actors, % Maximum number of shown actors - actors, % List of known actors - refresh_needed, % Refresh is needed in order to show all actors - display_mode, % Display all or only matching actors - detail_level, % Show only events with lesser detail level - hide_actions, % Hide/show events where to == from actor (bool) - hide_unknown, % Hide/show events with unknown actor (bool) - is_suspended, % Suspend viewer updates (bool) - title, % GUI: Window title - win, % GUI: Window object - menubar, % GUI: Menu bar object - packer, % GUI: Packer object - width, % GUI: Window width - height, % GUI: Window height - scale, % GUI: Scaling factor on canvas - font, % GUI: Font to be used on text labels - canvas_width, % GUI: Canvas width - canvas_height, % GUI: Canvas height - canvas, % GUI: Canvas object - y_pos}). % GUI: Current y position on canvas - --record(actor, {name, string}). - --define(initial_x, 10). --define(incr_x, 60). --define(initial_y, 15). --define(incr_y, 15). - -%%%---------------------------------------------------------------------- -%%% Client side -%%%---------------------------------------------------------------------- - -start_link(Options) -> - case parse_opt(Options, default_state(), []) of - {ok, S, CollectorOpt} -> - case S#state.collector_pid of - CollectorPid when is_pid(CollectorPid) -> - case gen_server:start_link(?MODULE, [S], []) of - {ok, Pid} when S#state.parent_pid =/= self() -> - unlink(Pid), - {ok, Pid}; - Other -> - Other - end; - undefined -> - case et_collector:start_link(CollectorOpt) of - {ok, CollectorPid} -> - S2 = S#state{collector_pid = CollectorPid}, - case gen_server:start_link(?MODULE, [S2], []) of - {ok, Pid} when S#state.parent_pid =/= self() -> - unlink(Pid), - {ok, Pid}; - Other -> - Other - end; - {error, Reason} -> - {error, {et_collector, Reason}} - end - end; - {error, Reason} -> - {error, Reason} - end. - -default_state() -> - #state{parent_pid = self(), - collector_pid = undefined, - detail_level = ?detail_level_max, - active_filter = ?DEFAULT_FILTER_NAME, - filters = [?DEFAULT_FILTER], - event_order = trace_ts, - is_suspended = false, - max_events = 100, - first_event = first, - last_event = first, - events = queue_new(), - max_actors = 5, - actors = [create_actor(?unknown)], - selected_actor = ?unknown, - hide_actions = false, - hide_unknown = false, - refresh_needed = false, - display_mode = all, - scale = 2, - canvas_height = 0, - canvas_width = 0, - width = 800, - height = 600}. - -parse_opt([], S, CollectorOpt) -> - {ok, S, [{parent_pid, S#state.parent_pid} | CollectorOpt]}; -parse_opt([H | T], S, CollectorOpt) -> - case H of - {parent_pid, Parent} when Parent =:= undefined -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S#state{parent_pid = Parent}, CollectorOpt2); - {parent_pid, Parent} when is_pid(Parent) -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S#state{parent_pid = Parent}, CollectorOpt2); - {title, Title} -> - parse_opt(T, S#state{title = name_to_string(Title)}, CollectorOpt); - {detail_level, Level} when is_integer(Level), - Level >= ?detail_level_min, - Level =< ?detail_level_max -> - parse_opt(T, S#state{detail_level = Level}, CollectorOpt); - {detail_level, max} -> - parse_opt(T, S#state{detail_level = ?detail_level_max}, CollectorOpt); - {detail_level, min} -> - parse_opt(T, S#state{detail_level = ?detail_level_min}, CollectorOpt); - {is_suspended, true} -> - parse_opt(T, S#state{is_suspended = true}, CollectorOpt); - {is_suspended, false} -> - parse_opt(T, S#state{is_suspended = false}, CollectorOpt); - {scale, Scale} when is_integer(Scale), Scale > 0 -> - parse_opt(T, S#state{scale = Scale}, CollectorOpt); - {width, W} when is_integer(W), W > 0 -> - parse_opt(T, S#state{width = W, canvas_width = W}, CollectorOpt); - {height, WH} when is_integer(WH), WH > 0 -> - parse_opt(T, S#state{height = WH, canvas_height = WH}, CollectorOpt); - {collector_pid, Pid} when is_pid(Pid) -> - parse_opt(T, S#state{collector_pid = Pid}, CollectorOpt); - {collector_pid, undefined} -> - parse_opt(T, S#state{collector_pid = undefined}, CollectorOpt); - {active_filter, Name} when is_atom(Name) -> - parse_opt(T, S#state{active_filter = Name}, CollectorOpt); - {event_order, trace_ts} -> %% BUGBUG: Verify event_order with collector - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S#state{event_order = trace_ts}, CollectorOpt2); - {event_order, event_ts} -> %% BUGBUG: Verify event_order with collector - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S#state{event_order = event_ts}, CollectorOpt2); - {trace_port, _Port} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {trace_max_queue, _Queue} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {trace_pattern, _Pattern} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {trace_global, _Boolean} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {trace_client, _Client} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {dict_insert, {filter, Name}, Fun} -> - if - is_atom(Name), is_function(Fun) -> - F = #filter{name = Name, function = Fun}, - Filters = lists:keydelete(Name, #filter.name, S#state.filters), - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S#state{filters = Filters ++ [F]}, CollectorOpt2); - true -> - {error, {bad_option, H}} - end; - {dict_insert, {subscriber, Pid}, _Val} -> - if - is_pid(Pid) -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - true -> - {error, {bad_option, H}} - end; - {dict_insert, _Key, _Val} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {dict_delete, {filter, Name}} -> - Filters = lists:keydelete(Name, #filter.name, S#state.filters), - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S#state{filters = Filters}, CollectorOpt2); - {dict_delete, _Key} -> - CollectorOpt2 = [H | CollectorOpt], - parse_opt(T, S, CollectorOpt2); - {max_events, Max} when is_integer(Max), Max > 0-> - parse_opt(T, S#state{max_events = Max}, CollectorOpt); - {max_events, Max} when Max =:= infinity -> - parse_opt(T, S#state{max_events = Max}, CollectorOpt); - {max_actors, Max} when is_integer(Max), Max >= 0-> - parse_opt(T, S#state{max_actors = Max}, CollectorOpt); - {max_actors, Max} when Max =:= infinity -> - parse_opt(T, S#state{max_actors = Max}, CollectorOpt); - {actors, ActorNames} when is_list(ActorNames) -> - ActorNames2 = - case lists:member(?unknown, ActorNames) of - false -> [?unknown | ActorNames]; - true -> ActorNames - end, - Actors = [create_actor(Name) || Name <- ActorNames2], - parse_opt(T, S#state{actors = Actors}, CollectorOpt); - {first_event, First} -> - parse_opt(T, S#state{first_event = First}, CollectorOpt); - {hide_unknown, Bool} when Bool =:= false -> - parse_opt(T, S#state{hide_unknown = Bool}, CollectorOpt); - {hide_unknown, Bool} when Bool =:= true -> - parse_opt(T, S#state{hide_unknown = Bool}, CollectorOpt); - {hide_actions, Bool} when Bool =:= false -> - parse_opt(T, S#state{hide_actions = Bool}, CollectorOpt); - {hide_actions, Bool} when Bool =:= true -> - parse_opt(T, S#state{hide_actions = Bool}, CollectorOpt); - {display_mode, Mode = all} -> - parse_opt(T, S#state{display_mode = Mode}, CollectorOpt); - {display_mode, Mode = {search_actors, Dir, _Key, Actors}} when is_list(Actors), Dir =:= forward -> - parse_opt(T, S#state{display_mode = Mode}, CollectorOpt); - {display_mode, Mode = {search_actors, Dir, _Key, Actors}} when is_list(Actors), Dir =:= reverse -> - parse_opt(T, S#state{display_mode = Mode}, CollectorOpt); - - Bad -> - {error, {bad_option, Bad}} - end; -parse_opt(BadList, _S, _CollectorOpt) -> - {error, {bad_option_list, BadList}}. - -do_dict_insert({filter, Name}, Fun, S) when is_atom(Name), is_function(Fun) -> - F = #filter{name = Name, function = Fun}, - Filters = lists:keydelete(Name, #filter.name, S#state.filters), - Filters2 = lists:keysort(#filter.name, [F | Filters]), - gs:destroy(filter_menu), - create_filter_menu(S#state.active_filter, Filters2), - S#state{filters = Filters2}; -do_dict_insert(_Key, _Val, S) -> - %% ok = error_logger:format("~p(~p): handle_info({et, {dict_insert, ~p, ~p}})~n", - %% [?MODULE, self(), Key, Val]), - S. - -do_dict_delete({filter, Name}, S) when is_atom(Name), Name =/= S#state.active_filter -> - Filters = lists:keydelete(Name, #filter.name, S#state.filters), - gs:destroy(filter_menu), - create_filter_menu(S#state.active_filter, Filters), - S#state{filters = Filters}; -do_dict_delete(_Key, S) -> - %% ok = error_logger:format("~p(~p): handle_info({et, {dict_delete, ~p}})~n", - %% [?MODULE, self(), Key]), - S. - -%%%---------------------------------------------------------------------- -%%% Callback functions from gen_server -%%%---------------------------------------------------------------------- - -%%---------------------------------------------------------------------- -%% Func: init/1 -%% Returns: {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%%---------------------------------------------------------------------- - -init([S]) when is_record(S, state) -> - process_flag(trap_exit, true), - InitialTimeout = 0, - case S#state.parent_pid of - undefined -> - ignore; - Pid when is_pid(Pid) -> - link(Pid) - end, - et_collector:dict_insert(S#state.collector_pid, - {subscriber, self()}, - ?MODULE), - {ok, create_main_window(S), InitialTimeout}. - -%%---------------------------------------------------------------------- -%% Func: handle_call/3 -%% Returns: {reply, Reply, State} | -%% {reply, Reply, State, Timeout} | -%% {noreply, State} | -%% {noreply, State, Timeout} | -%% {stop, Reason, Reply, State} | (terminate/2 is called) -%% {stop, Reason, State} (terminate/2 is called) -%%---------------------------------------------------------------------- - -handle_call(get_collector_pid, _From, S) -> - Reply = S#state.collector_pid, - reply(Reply, S); -handle_call(stop, _From, S) -> - gs:destroy(S#state.win), - {stop, shutdown, ok, S}; -handle_call(Request, From, S) -> - ok = error_logger:format("~p(~p): handle_call(~p, ~p, ~p)~n", - [?MODULE, self(), Request, From, S]), - Reply = {error, {bad_request, Request}}, - reply(Reply, S). - -%%---------------------------------------------------------------------- -%% Func: handle_cast/2 -%% Returns: {noreply, State} | -%% {noreply, State, Timeout} | -%% {stop, Reason, State} (terminate/2 is called) -%%---------------------------------------------------------------------- - -handle_cast(Msg, S) -> - ok = error_logger:format("~p(~p): handle_cast(~p, ~p)~n", - [?MODULE, self(), Msg, S]), - noreply(S). - -%%---------------------------------------------------------------------- -%% Func: handle_info/2 -%% Returns: {noreply, State} | -%% {noreply, State, Timeout} | -%% {stop, Reason, State} (terminate/2 is called) -%%---------------------------------------------------------------------- - -handle_info({et, {more_events, _Size}}, S) -> - noreply(S); -handle_info({et, {insert_actors, ActorNames}}, S) when is_list(ActorNames) -> - Fun = fun(N, Actors) -> - case lists:keymember(N, #actor.name, Actors) of - true -> Actors; - false -> Actors ++ [create_actor(N)] - end - end, - Actors = lists:foldl(Fun, S#state.actors, ActorNames), - S2 = refresh_main_window(S#state{actors = Actors}), - noreply(S2); -handle_info({et, {delete_actors, ActorNames}}, S) when is_list(ActorNames)-> - Fun = fun(N, Actors) when N =:= ?unknown -> - Actors; - (N, Actors) -> - lists:keydelete(N, #actor.name, Actors) - end, - New = lists:foldl(Fun, S#state.actors, ActorNames), - S2 = refresh_main_window(S#state{actors = New}), - noreply(S2); -handle_info({et, {dict_insert, Key, Val}}, S) -> - S2 = do_dict_insert(Key, Val, S), - noreply(S2); -handle_info({et, {dict_delete, Key}}, S) -> - S2 = do_dict_delete(Key, S), - noreply(S2); -handle_info({et, first}, S) -> - S2 = scroll_first(S), - noreply(S2); -handle_info({et, prev}, S) -> - S2 = scroll_prev(S), - noreply(S2); -handle_info({et, next}, S) -> - S2 = scroll_next(S), - noreply(S2); -handle_info({et, last}, S) -> - S2 = scroll_last(S), - noreply(S2); -handle_info({et, refresh}, S) -> - S2 = refresh_main_window(S), - noreply(S2); -handle_info({et, {display_mode, Mode}}, S) -> - S2 = change_display_mode(Mode, S), - noreply(S2); -handle_info({et, close}, S) -> - gs:destroy(S#state.win), - {stop, shutdown, S}; -handle_info({gs, Button, click, Data, Other} = Click, S) -> - CollectorPid = S#state.collector_pid, - case Button of - close -> - gs:destroy(S#state.win), - {stop, shutdown, S}; - suspended -> - case Other of - [_Text, _Group, Bool | _] when Bool =:= true -> - S2 = do_suspend(S), - noreply(S2); - [_Text, _Group, Bool | _] when Bool =:= false -> - S2 = do_resume(S), - noreply(S2); - _ -> - click_error(Click, S), - noreply(S) - end; - hide_actions -> - case Other of - [_Text, _Group, Bool | _] when Bool =:= true -> - S2 = refresh_main_window(S#state{hide_actions = Bool}), - noreply(S2); - [_Text, _Group, Bool | _] when Bool =:= false -> - S2 = refresh_main_window(S#state{hide_actions = Bool}), - noreply(S2); - _ -> - click_error(Click, S), - noreply(S) - end; - hide_unknown -> - case Other of - [_Text, _Group, Bool | _] when Bool =:= true -> - S2 = refresh_main_window(S#state{hide_unknown = Bool}), - noreply(S2); - [_Text, _Group, Bool | _] when Bool =:= false -> - S2 = refresh_main_window(S#state{hide_unknown = Bool}), - noreply(S2); - _ -> - click_error(Click, S), - noreply(S) - end; - up -> - S2 = scroll_up(S), - noreply(S2); - down -> - S2 = scroll_down(S), - noreply(S2); - first -> - S2 = scroll_first(S), - noreply(S2); - prev -> - S2 = scroll_prev(S), - noreply(S2); - next -> - S2 = scroll_next(S), - noreply(S2); - last -> - S2 = scroll_last(S), - noreply(S2); - refresh -> - S2 = refresh_main_window(S), - noreply(S2); - {display_mode, Mode} -> - S2 = change_display_mode(Mode, S), - noreply(S2); - close_all -> - close_all(S); - close_all_others -> - close_all_others(S); - first_all -> - et_collector:multicast(CollectorPid, first), - noreply(S); - prev_all -> - et_collector:multicast(CollectorPid, prev), - noreply(S); - next_all -> - et_collector:multicast(CollectorPid, next), - noreply(S); - last_all -> - et_collector:multicast(CollectorPid, last), - noreply(S); - refresh_all -> - et_collector:multicast(CollectorPid, refresh), - noreply(S); - clear_all -> - et_collector:clear_table(CollectorPid), - et_collector:multicast(CollectorPid, refresh), - noreply(S); - load_all -> - et_collector:start_trace_client(CollectorPid, event_file, "et_viewer.log"), - noreply(S); - save_all -> - et_collector:save_event_file(CollectorPid, - "et_viewer.log", - [existing, write, keep]), - noreply(S); - {open_viewer, Scale} -> - Actors = [A#actor.name || A <- S#state.actors], - open_viewer(Scale, S#state.active_filter, Actors, S), - noreply(S); - _Level when Data =:= detail_level, is_integer(hd(Other)), - hd(Other) >= ?detail_level_min, - hd(Other) =< ?detail_level_max -> - S2 = S#state{detail_level = hd(Other)}, - noreply(S2); - _PopupMenuItem when is_record(Data, filter) -> - open_viewer(S#state.scale, Data#filter.name, [?unknown], S), - noreply(S); - _ -> - click_error(Click, S), - noreply(S) - end; -handle_info({gs, _Obj, destroy,_, _}, S) -> - gs:destroy(S#state.win), - {stop, shutdown, S}; -handle_info({gs, _Obj, buttonpress, _, [_Button, X, Y | _]}, S) -> - S3 = - case y_to_n(Y, S) of - actor -> - %% Actor click - case S#state.actors of - [] -> - S; - _ -> - N = x_to_n(X, S), - A = lists:nth(N, S#state.actors), - S#state{selected_actor = A} - end; - {event, N} -> - %% Event click - List = queue_to_list(S#state.events), - S2 = S#state{events = list_to_queue(List)}, - - Key = lists:nth(N, List), - Pid = S#state.collector_pid, - Fun = fun create_contents_window/2, - case et_collector:iterate(Pid, Key, -1) of - Prev when Prev =:= Key -> - et_collector:iterate(Pid, first, 1, Fun, S2); - Prev -> - et_collector:iterate(Pid, Prev, 1, Fun, S2) - end - end, - noreply(S3); -handle_info({gs, _Obj, buttonrelease, _, [_Button, X, Y | _]}, S) -> - S2 = - case y_to_n(Y, S) of - actor -> - %% Actor click - case S#state.actors of - [] -> - S; - Actors -> - N = x_to_n(X, S), - New = lists:nth(N, S#state.actors), - Old = S#state.selected_actor, - case New#actor.name =:= Old#actor.name of - true -> - A = S#state.selected_actor, - toggle_search_for_actor(A#actor.name, S); - false -> - move_actor(Old, New, Actors, S) - end - end; - {event, _N} -> - %% Event click ignored - S - end, - noreply(S2); -handle_info({gs, _Obj, keypress, _, [KeySym, _Keycode, _Shift, _Control | _]} = Key, S) -> - case KeySym of - 'c' -> - close_all_others(S); - 'C' -> - close_all(S); - 'Up' -> - S2 = scroll_up(S), - noreply(S2); - 'Down' -> - S2 = scroll_down(S), - noreply(S2); - 'f' -> - S2 = scroll_first(S), - noreply(S2); - 'p' -> - S2 = scroll_prev(S), - noreply(S2); - 'Prior' -> - S2 = scroll_prev(S), - noreply(S2); - 'n' -> - S2 = scroll_next(S), - noreply(S2); - 'Next' -> - S2 = scroll_next(S), - noreply(S2); - 'l' -> - S2 = scroll_last(S), - noreply(S2); - 'r' -> - S2 = refresh_main_window(S), - noreply(S2); - 'F' -> - et_collector:multicast(S#state.collector_pid, first), - noreply(S); - 'P' -> - et_collector:multicast(S#state.collector_pid, prev), - noreply(S); - 'N' -> - et_collector:multicast(S#state.collector_pid, next), - noreply(S); - 'L' -> - et_collector:multicast(S#state.collector_pid, last), - noreply(S); - 'R' -> - et_collector:multicast(S#state.collector_pid, refresh), - noreply(S); - - 'a' -> - S2 = S#state{display_mode = all}, - S3 = refresh_main_window(S2), - noreply(S3); - - 'equal' -> - Scale = S#state.scale, - Actors = [A#actor.name || A <- S#state.actors], - open_viewer(Scale, S#state.active_filter, Actors, S), - noreply(S); - 'plus' -> - Scale = S#state.scale + 1, - Actors = [A#actor.name || A <- S#state.actors], - open_viewer(Scale, S#state.active_filter, Actors, S), - noreply(S); - 'minus' -> - case S#state.scale of - 1 -> - gs:config(S#state.canvas, beep); - Scale -> - Actors = [A#actor.name || A <- S#state.actors], - open_viewer(Scale - 1, S#state.active_filter, Actors, S) - end, - noreply(S); - 0 -> - case lists:keysearch(?DEFAULT_FILTER_NAME, #filter.name, S#state.filters) of - {value, F} when is_record(F, filter) -> - open_viewer(S#state.scale, F#filter.name, [?unknown], S); - false -> - gs:config(S#state.canvas, beep) - end, - noreply(S); - Int when is_integer(Int), Int > 0, Int =< 9 -> - case catch lists:nth(Int, S#state.filters) of - F when is_record(F, filter) -> - open_viewer(S#state.scale, F#filter.name, [?unknown], S); - {'EXIT', _} -> - gs:config(S#state.canvas, beep) - end, - noreply(S); - - 'Shift_L' -> - noreply(S); - 'Shift_R' -> - noreply(S); - 'Caps_Lock' -> - noreply(S); - - _ -> - click_error(Key, S), - noreply(S) - end; -handle_info({gs, _Obj,configure, [], [W, H | _]}, S) -> - gs:config(S#state.packer, [{width, W}, {height, H}]), - S2 = S#state{width = W, height = H}, - noreply(S2); -handle_info(timeout, S) -> - Try = - case S#state.display_mode of - {search_actors, reverse, _, _} -> - -10; - _ -> - 10 - end, - if - S#state.is_suspended =:= true -> - {noreply, S, infinity}; - S#state.max_events =:= infinity -> - display_more_events(Try, S); - true -> - Needed = S#state.max_events - queue_length(S#state.events), - if - Needed =< 0 -> {noreply, S, infinity}; - Needed > 10 -> display_more_events(Try, S); - Needed =< 10 -> display_more_events(Needed, S) - end - end; - -handle_info({'EXIT', Pid, Reason}, S) -> - if - Pid =:= S#state.collector_pid -> - unlink(Pid), - gs:destroy(S#state.win), - {stop, Reason, S}; - Pid =:= S#state.parent_pid -> - unlink(Pid), - gs:destroy(S#state.win), - {stop, Reason, S}; - true -> - noreply(S) - end; -handle_info(Info, S) -> - ok = error_logger:format("~p(~p): handle_info(~p, ~p)~n", - [?MODULE, self(), Info, S]), - noreply(S). - -%%---------------------------------------------------------------------- -%% Func: terminate/2 -%% Purpose: Shutdown the server -%% Returns: any (ignored by gen_server) -%%---------------------------------------------------------------------- - -terminate(_Reason, _S) -> - ignore. - -%%---------------------------------------------------------------------- -%% Func: code_change/3 -%% Purpose: Convert process state when code is changed -%% Returns: {ok, NewState} -%%---------------------------------------------------------------------- - -code_change(_OldVsn, S, _Extra) -> - {ok, S}. - -%%%---------------------------------------------------------------------- -%%% Handle suspend/resume -%%%---------------------------------------------------------------------- - -reply(Reply, S) -> - case queue_length(S#state.events) of - _ when S#state.is_suspended =:= true -> - {reply, Reply, S, infinity}; - _ when S#state.max_events =:= infinity -> - {reply, Reply, S, 500}; - N when N >= S#state.max_events -> - {reply, Reply, S, infinity}; - _ -> - {reply, Reply, S, 0} - end. - -noreply(S) -> - case queue_length(S#state.events) of - _ when S#state.is_suspended =:= true -> - {noreply, S, infinity}; - _ when S#state.max_events =:= infinity -> - {noreply, S, 500}; - N when N >= S#state.max_events -> - {noreply, S, infinity}; - _ -> - {noreply, S, 0} - end. - -do_suspend(S) -> - config_suspend(S#state{is_suspended = true}). - -do_resume(S) -> - config_suspend(S#state{is_suspended = false}). - -config_suspend(S) -> - Suspended = S#state.is_suspended, - gs:config(refresh, [{enable, not Suspended}]), - gs:config(refresh_all, [{enable, not Suspended}]), - gs:config(clear_all, [{enable, not Suspended}]), - S. - -refresh_main_window(S) -> - Pid = S#state.collector_pid, - Key = S#state.first_event, - case et_collector:iterate(Pid, Key, -1) of - Prev when Prev =:= Key -> - scroll_first(S); - _Prev -> - S2 = S#state{last_event = S#state.first_event}, - clear_canvas(S2) - end. - -scroll_first(S) -> - S2 = S#state{first_event = first, last_event = first}, - clear_canvas(S2). - -scroll_prev(S) -> - Try = - case S#state.max_events of - infinity -> -10; - Max -> -Max - end, - Key = et_collector:iterate(S#state.collector_pid, S#state.first_event, Try), - S2 = S#state{first_event = Key, last_event = Key}, - clear_canvas(S2). - -scroll_next(S) -> - S2 = S#state{first_event = S#state.last_event}, - clear_canvas(S2). - -scroll_up(S) -> - Key = et_collector:iterate(S#state.collector_pid, S#state.first_event, -5), - S2 = S#state{first_event = Key, last_event = Key}, - clear_canvas(S2). - -scroll_down(S) -> - Key = et_collector:iterate(S#state.collector_pid, S#state.first_event, 5), - S2 = S#state{first_event = Key, last_event = Key}, - clear_canvas(S2). - -scroll_last(S) -> - S2 = S#state{first_event = last, last_event = last}, - clear_canvas(S2). - -change_display_mode(Mode, S) -> - case Mode of - all -> - S2 = S#state{display_mode = Mode}, - refresh_main_window(S2); - {search_actors, _Dir, _Key, []} -> - S2 = S#state{display_mode = all}, - refresh_main_window(S2); - {search_actors, _Dir, Key, Actors} when is_list(Actors) -> - Pid = S#state.collector_pid, - Prev = et_collector:iterate(Pid, Key, -1), - S2 = S#state{first_event = Prev, - last_event = Prev, - display_mode = Mode}, - clear_canvas(S2) - end. - -close_all(S) -> - et_collector:multicast(S#state.collector_pid, close), - timer:sleep(timer:seconds(1)), - spawn(et_collector, stop, [S#state.collector_pid]), - gs:destroy(S#state.win), - {stop, shutdown, S}. - -close_all_others(S) -> - Fun = - fun({{subscriber, Pid}, _}) -> - if - Pid =:= self() -> - ignore; - true -> - unlink(Pid), - Pid ! {et, close} - end - end, - All = et_collector:dict_match(S#state.collector_pid, - {{subscriber, '_'}, '_'}), - lists:foreach(Fun, All), - noreply(S). - -click_error(Click, S) -> - gs:config(S#state.canvas, beep), - io:format("~p: ignored: ~p~n", [?MODULE, Click]). - -%%%---------------------------------------------------------------------- -%%% Clone viewer -%%%---------------------------------------------------------------------- - -open_viewer(Scale, FilterName, Actors, S) -> - Filters = [{dict_insert, {filter, F#filter.name}, F#filter.function} - || F <- S#state.filters], - Options = - [{parent_pid, S#state.parent_pid}, - {title, S#state.title}, - {collector_pid, S#state.collector_pid}, - {is_suspended, S#state.is_suspended}, - {detail_level, S#state.detail_level}, - {active_filter, FilterName}, - {event_order, S#state.event_order}, - {first_event, S#state.first_event}, - {max_events, S#state.max_events}, - {max_actors, S#state.max_actors}, - {hide_actions, S#state.hide_actions}, - {hide_unknown, S#state.hide_unknown}, - {is_suspended, S#state.is_suspended}, - {actors, Actors}, - {scale, Scale}, - {width, S#state.width}, - {height, S#state.height} | Filters], - case start_link(Options) of - {ok, ViewerPid} -> - unlink(ViewerPid), - ok; - {error, Reason} -> - ok = error_logger:format("~p: Failed to start a new window: ~p~n", - [?MODULE, Reason]) - end. - -%%%---------------------------------------------------------------------- -%%% Handle graphics -%%%---------------------------------------------------------------------- - -create_main_window(S) -> - Font = select_font(S#state.scale), - GS = gs:start(), - Name = name_to_string(S#state.active_filter), - Title = case S#state.title of - undefined -> atom_to_list(?MODULE); - Explicit -> name_to_string(Explicit) - end, - WinOpt = [{title, Title ++ " (filter: " ++ Name ++ ")"}, - {configure, true}, - {width, S#state.width}, - {height, S#state.height}], - Win = gs:window(GS, WinOpt), - Bar = gs:menubar(Win, []), - - create_file_menu(Bar), - create_viewer_menu(Bar), - create_collector_menu(Bar), - gs:menubutton(filter_button, Bar, [{label, {text, "Filter"}}]), - create_filter_menu(S#state.active_filter, S#state.filters), - create_help_menu(Bar), - - config_suspend(S), - - PackerOpt = [{packer_x, [{fixed, 5}, {fixed, 40}, {fixed, 40}, - {stretch, 1}, {fixed, 5}]}, - {packer_y, [{fixed, 30}, {fixed, 30}, - {stretch, 1}, {fixed, 30}]}, - {x, 0}, {y, 30}], - Packer = gs:frame(Win, PackerOpt), - gs:checkbutton(suspended, Packer, [{label,{text,"Freeze"}}, - {x, 10}, {y, 0}, - {width, 120}, {align, w}, - {select, S#state.is_suspended}]), - gs:checkbutton(hide_actions, Packer, [{label,{text,"Hide From=To"}}, - {x, 10}, {y, 20}, - {width, 120}, {align, w}, - {select, S#state.hide_actions}]), - gs:checkbutton(hide_unknown, Packer, [{label,{text,"Hide Unknown"}}, - {x, 10}, {y, 40}, - {width, 120}, {align, w}, - {select, S#state.hide_unknown}]), - gs:scale(Packer, [{text,"Detail Level"}, - {range, {?detail_level_min, ?detail_level_max}}, - {orient, horizontal}, - {x, 150}, {y, 0}, {height, 65}, {width, 200}, - {pos, S#state.detail_level}, {data, detail_level}]), - CanvasW = calc_canvas_width(S), - CanvasH = calc_canvas_height(S), - CanOpt = [{pack_xy, {{2, 4}, 3}}, {vscroll, right}, {hscroll, bottom}, - {scrollregion, {2, 2, CanvasW, CanvasH}}], - Canvas = gs:canvas(Packer, CanOpt), - gs:config(Canvas, [{buttonpress, true}, {buttonrelease, true}]), - gs:config(Packer, [{width, S#state.width}, {height, S#state.height}]), - gs:config(Win, [{map, true}, {keypress, true}]), - S2 = S#state{title = Title, - win = Win, font = Font, packer = Packer, - canvas_width = CanvasW, canvas_height = CanvasH, - canvas = Canvas, - y_pos = ?initial_y * S#state.scale}, - draw_all_actors(S2). - -select_font(Scale) when is_integer(Scale) -> - case Scale of - 1 -> {courier, 7}; - 2 -> {courier, 10}; - 3 -> {courier, 12}; - 4 -> {courier, 14}; - S -> {courier, S * 4} - end. - -create_file_menu(Bar) -> - Button = gs:menubutton(Bar, [{label, {text, "File"}}]), - Menu = gs:menu(Button, []), - gs:menuitem(close_all, Menu, [{label, {text, "Close Collector and all Viewers (C) "}}]), - gs:menuitem(close_all_others, Menu, [{label, {text, "Close other Viewers, but keep Collector (c)"}}]), - gs:menuitem(close, Menu, [{label, {text, "Close this Viewer, but keep Collector"}}]), - gs:menuitem(Menu, [{itemtype, separator}]), - - gs:menuitem(clear_all, Menu, [{label, {text, "Clear Collector"}}]), - gs:menuitem(load_all, Menu, [{label, {text, "Load Collector from the file \"et_viewer.log\""}}]), - gs:menuitem(save_all, Menu, [{label, {text, "Save Collector to the file \"et_viewer.log\""}}]). - -create_viewer_menu(Bar) -> - Button = gs:menubutton(Bar, [{label, {text, "Viewer"}}]), - Menu = gs:menu(Button, []), - gs:menuitem(Menu, [{label, {text, "Scroll this Viewer"}}, {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(first, Menu, [{label, {text, "First (f)"}}]), - gs:menuitem(prev, Menu, [{label, {text, "Prev (p)"}}]), - gs:menuitem(next, Menu, [{label, {text, "Next (n)"}}]), - gs:menuitem(last, Menu, [{label, {text, "Last (l)"}}]), - gs:menuitem(refresh, Menu, [{label, {text, "Refresh (r)"}}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(up, Menu, [{label, {text, "Up 5 (Up)"}}]), - gs:menuitem(down, Menu, [{label, {text, "Down 5 (Down)"}}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(Menu, [{label, {text, "Search in this Viewer"}}, {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem({mode, all}, Menu, [{label, {text, "Abort search. Display all (a)"}}]). - -create_collector_menu(Bar) -> - Button = gs:menubutton(Bar, [{label, {text, "Collector"}}]), - Menu = gs:menu(Button, []), - gs:menuitem(Menu, [{label, {text, "Scroll all Viewers"}}, {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(first_all, Menu, [{label, {text, "First (F)"}}]), - gs:menuitem(prev_all, Menu, [{label, {text, "Prev (P)"}}]), - gs:menuitem(next_all, Menu, [{label, {text, "Next (N)"}}]), - gs:menuitem(last_all, Menu, [{label, {text, "Last (L)"}}]), - gs:menuitem(refresh_all, Menu, [{label, {text, "Refresh (R)"}}]). - -create_filter_menu(ActiveFilterName, Filters) -> - Menu = gs:menu(filter_menu, filter_button, []), - Item = fun(F, N) when F#filter.name =:= collector -> - Label = lists:concat([pad_string(F#filter.name, 20), "(0)"]), - gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]), - N + 1; - (F, N) -> - Label = lists:concat([pad_string(F#filter.name, 20), "(", N, ")"]), - gs:menuitem(Menu, [{label, {text, Label}}, {data, F}]), - N + 1 - end, - gs:menuitem(Menu, [{label, {text, "Same Filter New Scale"}}, {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - {value, Filter} = lists:keysearch(ActiveFilterName, #filter.name, Filters), - Same = lists:concat([pad_string(ActiveFilterName, 20), "(=)"]), - Larger = lists:concat([pad_string(ActiveFilterName, 20), "(+)"]), - Smaller = lists:concat([pad_string(ActiveFilterName, 20), "(-)"]), - gs:menuitem(Menu, [{label, {text, Same}}, {data, Filter}]), - gs:menuitem(Menu, [{label, {text, Smaller}}, {data, Filter}]), - gs:menuitem(Menu, [{label, {text, Larger}}, {data, Filter}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(Menu, [{label, {text, "New Filter Same Scale"}}, {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - lists:foldl(Item, 1, Filters). - -create_help_menu(Bar) -> - Button = gs:menubutton(Bar, [{label, {text, "Help"}}]), - Menu = gs:menu(Button, []), - gs:menuitem(Menu, [{label, {text, "Display details of an event"}}, - {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{label, {text, " Single click on the name tag or the arrow (Mouse-1)"}}, - {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(Menu, [{label, {text, "Toggle actor search"}}, - {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{label, {text, " Single click on the name tag (Mouse-1)"}}, - {enable,false}]), - gs:menuitem(Menu, [{itemtype, separator}]), - gs:menuitem(Menu, [{label, {text, "Move actor"}}, - {bg, lightblue}, {enable,false}]), - gs:menuitem(Menu, [{label, {text, " se drag and drop on name tag (Mouse-1)"}}, - {enable,false}]). - -clear_canvas(S) -> - gs:destroy(S#state.canvas), - CanvasW = calc_canvas_width(S), - CanvasH = calc_canvas_height(S), - CanOpt = [{pack_xy, {{2, 4}, 3}}, {vscroll, right}, {hscroll, bottom}, - {scrollregion, {2, 2, CanvasW, CanvasH}}], - Canvas = gs:canvas(S#state.packer, CanOpt), - gs:config(S#state.packer, [{width, S#state.width}, {height, S#state.height}]), - gs:config(Canvas, [{buttonpress, true}, {buttonrelease, true}]), - S2 = S#state{refresh_needed = false, - y_pos = ?initial_y * S#state.scale, - canvas = Canvas, - canvas_width = CanvasW, - canvas_height = CanvasH, - events = queue_new()}, - draw_all_actors(S2). - -calc_canvas_width(S) -> - Min = calc_min_actors(S), - CanvasW = ((2 * ?initial_x) + (Min * ?incr_x)) * S#state.scale, - lists:max([CanvasW, S#state.width - (15 * S#state.scale), S#state.canvas_width]). - -calc_canvas_height(S) -> - Min = calc_min_events(S), - CanvasH = ((2 * ?initial_y) + (Min * ?incr_y)) * S#state.scale, - lists:max([CanvasH, S#state.height - (4 * 30), S#state.canvas_height]). - -calc_min_actors(S) -> - Max = S#state.max_actors, - N = length(S#state.actors), - if - Max =:= infinity -> - N * 2; - Max < N -> - N; - true -> - Max - end. - -calc_min_events(S) -> - Max = S#state.max_events, - N = queue_length(S#state.events), - if - Max =:= infinity -> - N * 2; - Max < N -> - N; - true -> - Max - end. - -display_more_events(Try, S) -> - Name = S#state.active_filter, - {value, F} = lists:keysearch(Name, #filter.name, S#state.filters), - FilterFun = F#filter.function, - Fun = fun(Event, State) -> - case catch FilterFun(Event) of - true -> - State2 = ensure_key(Event, State), - opt_display_event(Event, State2); - {true, Event2} -> - State2 = ensure_key(Event2, State), - opt_display_event(Event2, State2); - false -> - ensure_key(Event, State); - Bad -> - Contents = {bad_filter, Name, Bad, Event}, - Event2 = Event#event{contents = Contents, - from = bad_filter, - to = bad_filter}, - State2 = ensure_key(Event2, State), - opt_display_event(Event2, State2) - end - end, - Pid = S#state.collector_pid, - S2 = et_collector:iterate(Pid, S#state.last_event, Try, Fun, S), - case queue_length(S2#state.events) - queue_length(S#state.events) of - Diff when Diff =:= Try -> - %% Got as much as requested, look for more - %% io:format("Done: ~p~n", [{Try, Diff}]), - {noreply, S2, 0}; - _Diff when S2#state.first_event =:= S#state.first_event, - S2#state.last_event =:= S#state.last_event -> - %% Got lesser than requested, wait a while before looking for more - %% io:format("More: ~p~n", [{Try, Diff}]), - {noreply, S2, 500}; - _Diff -> - %% Got lesser than requested, look for more - %% io:format("More2: ~p~n", [{Try, Diff}]), - {noreply, S2, 0} - end. - -ensure_key(E, S) when is_record(E, event), is_record(S, state) -> - Key = et_collector:make_key(S#state.event_order, E), - case S#state.first_event of - first -> - S#state{first_event = Key, last_event = Key}; - last -> - S#state{first_event = Key, last_event = Key}; - _ -> - S#state{last_event = Key} - end. - -opt_display_event(E, S) -> - case S#state.display_mode of - all -> - display_event(E, S); - {search_actors, _Dir, _FirstKey, Actors} -> - %% Key = S#state.last_event, - From = select_actor_name(E#event.from, S), - case lists:member(From, Actors) of - true -> - display_event(E, S); - false -> - To = select_actor_name(E#event.to, S), - case lists:member(To, Actors) of - true -> - display_event(E, S); - false -> - S - end - end - end. - -select_actor_name(Name, S) -> - case lists:keymember(Name, #actor.name, S#state.actors) of - true -> Name; - false -> ?unknown - end. - -display_event(E, S) when E#event.detail_level < S#state.detail_level -> - {FromRefresh, From} = ensure_actor(E#event.from, S), - {FromName, FromPos, S2} = From, - {ToRefresh, To} = ensure_actor(E#event.to, S2), - {ToName, ToPos, S3} = To, - if - FromRefresh =/= false, ToRefresh =/= false -> - Key = S#state.last_event, - refresh_beep(S), - S3#state{refresh_needed = true, - events = queue_in(Key, S3#state.events)}; - FromName =:= ToName -> - case S#state.hide_actions of - true -> - S3; - false -> - Label = name_to_string(E#event.label), - draw_named_arrow(Label, FromName, FromPos, ToName, ToPos, S3) - end; - true -> - Label = name_to_string(E#event.label), - draw_named_arrow(Label, FromName, FromPos, ToName, ToPos, S3) - end; -display_event(_, S) -> - S. - -draw_named_arrow(Label, FromName, FromPos, ToName, ToPos, S) -> - Key = S#state.last_event, - case S#state.y_pos + (?incr_y * S#state.scale) of - _ when S#state.hide_unknown =:= true, FromName =:= ?unknown -> - S; - _ when S#state.hide_unknown =:= true, ToName =:= ?unknown -> - S; - Y when Y > S#state.canvas_height -> - refresh_beep(S), - S#state{refresh_needed = true, - events = queue_in(Key, S#state.events)}; - Y -> - S2 = S#state{y_pos = Y, events = queue_in(Key, S#state.events)}, - S3 = draw_arrow(FromPos, ToPos, S2), - draw_label(Label, FromName, ToName, FromPos, ToPos, S3) - end. - -refresh_beep(S) -> - case S#state.refresh_needed of - false -> - gs:config(S#state.canvas, beep), - gs:config(S#state.canvas, beep), - gs:config(S#state.canvas, beep); - true -> - ignore - end. - -draw_arrow(Pos, Pos, S) -> - S; -draw_arrow(FromPos, ToPos, S) -> - Y = S#state.y_pos, - CanOpts = [{coords, [{FromPos , Y}, {ToPos, Y}]}, - {arrow, last},{width, 1}, {fg, black}], - gs:line(S#state.canvas, CanOpts), - S. - -draw_label(Label, FromName, ToName, FromPos, ToPos, S) -> - Colour = - if - FromName =:= ?unknown, - ToName =:= ?unknown -> blue; %turquoise; - FromName =:= ?unknown -> orange; - ToName =:= ?unknown -> orange; - FromPos =:= ToPos -> blue; - true -> red - end, - Scale = S#state.scale, - X = lists:min([FromPos, ToPos]) + (6 * Scale), - Y = S#state.y_pos, - write_text(Label, X, Y, Colour, S), - S. - -draw_all_actors(State) -> - Scale = State#state.scale, - Fun = fun(A, X) -> - draw_actor(A, X, State), - X + (?incr_x * Scale) - end, - lists:foldl(Fun, ?initial_x * Scale, State#state.actors), - State. - -%% Returns: {NeedsRefreshBool, {ActorPos, NewsS, NewActors}} -ensure_actor(Name, S) -> - do_ensure_actor(Name, S, S#state.actors, 0). - -do_ensure_actor(Name, S, [H | _], N) when H#actor.name =:= Name -> - Pos = (?initial_x + (N * ?incr_x)) * S#state.scale, - {false, {Name, Pos, S}}; -do_ensure_actor(Name, S, [_ | T], N) -> - do_ensure_actor(Name, S, T, N + 1); -do_ensure_actor(Name, S, [], N) -> - %% A brand new actor, let's see if it does fit - Pos = (?initial_x + (N * ?incr_x)) * S#state.scale, - MaxActors = S#state.max_actors, - if - is_integer(MaxActors), N > MaxActors -> - %% Failed on max_actors limit, put into unknown - %% Assume that unknown always is in actor list - ensure_actor(?unknown, S); - Pos > (S#state.canvas_width - ((?initial_x - 15) * S#state.scale)) -> - %% New actor does not fit in canvas, refresh needed - A = create_actor(Name), - draw_actor(A, Pos, S), - {true, {Name, Pos, S#state{actors = S#state.actors ++ [A]}}}; - true -> - %% New actor fits in canvas. Draw the new actor. - A = create_actor(Name), - draw_actor(A, Pos, S), - {false, {Name, Pos, S#state{actors = S#state.actors ++ [A]}}} - end. - -draw_actor(A, LineX, S) -> - Scale = S#state.scale, - TextX = LineX - (5 * Scale), - TextY = ?initial_y * Scale, - LineTopY = TextY + ((?incr_y / 2) * Scale), - LineBotY = S#state.canvas_height - ((?incr_y / 2) * Scale), - Colour = case A#actor.name of - ?unknown -> orange; - _ -> red - end, - write_text(A#actor.string, TextX, TextY, Colour, S), - LineOpt = [{coords, [{LineX, LineTopY}, {LineX, LineBotY}]}, - {width, 1}, {fg, Colour}], - gs:line(S#state.canvas, LineOpt). - -toggle_search_for_actor(ActorName,S) -> - case S#state.display_mode of - all -> - io:format("~p: search for: ~p ++ ~p~n", [?MODULE, [], [ActorName]]), - %% Search for this actor - Key = S#state.first_event, - Actors = [ActorName], - Mode = {search_actors, forward, Key, Actors}, - change_display_mode(Mode, S); - {search_actors, Dir, Key, Actors}-> - Actors2 = - case lists:member(ActorName, Actors) of - true -> - io:format("~p: search for: ~p -- ~p~n", [?MODULE, Actors, [ActorName]]), - %% Remove actor from search list - Actors -- [ActorName]; - false -> - io:format("~p: search for: ~p ++ ~p~n", [?MODULE, Actors, [ActorName]]), - %% Add actor from search list - [ActorName | Actors] - end, - Mode2 = {search_actors, Dir, Key, Actors2}, - change_display_mode(Mode2, S) - end. - -move_actor(From, To, Actors, S) -> - Pos = #actor.name, - ToName = To#actor.name, - FromName = From#actor.name, - ToIx = actor_index(ToName, Pos, Actors), - FromIx = actor_index(FromName, Pos, Actors), - if - FromIx =/= 0, ToIx =/= 0, ToIx > FromIx -> - Actors2 = lists:keydelete(FromName, Pos, Actors), - Actors3 = insert_actor_after(From, To, Actors2), - S2 = S#state{actors = Actors3}, - refresh_main_window(S2); - FromIx =/= 0, ToIx =/= 0 -> - Actors2 = lists:keydelete(FromName, Pos, Actors), - Actors3 = insert_actor_before(From, To, Actors2), - S2 = S#state{actors = Actors3}, - refresh_main_window(S2); - true -> - %% Ignore - S - end. - -insert_actor_after(From, To, [H | T]) -> - case To#actor.name =:= H#actor.name of - true -> [H, From | T]; - false -> [H | insert_actor_after(From, To, T)] - end; -insert_actor_after(_From, _To, []) -> - []. - -insert_actor_before(From, To, [H | T]) -> - case To#actor.name =:= H#actor.name of - true -> [From, H | T]; - false -> [H | insert_actor_before(From, To, T)] - end; -insert_actor_before(_From, _To, []) -> - []. - -actor_index(_Key, _Pos, []) -> - 0; -actor_index(Key, Pos, [H | T]) -> - case Key =:= element(Pos, H) of - false -> actor_index(Key, Pos, T) + 1; - true -> 1 - end. - -y_to_n(Y, S) -> - Y2 = ((Y / S#state.scale) - ?initial_y + (?incr_y / 2)), - N = round(Y2 / ?incr_y - 0.2), - MaxN = queue_length(S#state.events), - if - N =< 0 -> actor; - N > MaxN -> actor; - true -> {event, N} - end. - -x_to_n(X, S) -> - Scale = S#state.scale, - Len = length(S#state.actors), - X2 = X - (?initial_x * Scale), - N = X2 / (?incr_x * Scale), - N2 = trunc(N + 1.5), - if - N2 > Len -> Len; - N2 < 1 -> 1; - true -> N2 - end. - -write_text(Text, X, Y, Colour, S) -> - Opt = [{coords, [{X, Y - (?incr_y * S#state.scale / 2)}]}, - {font, S#state.font}, {fg, Colour}, {text, Text}], - gs:text(S#state.canvas, Opt). - -create_contents_window(Event, S) -> - Options = [{viewer_pid, self()}, - {event, Event}, - {event_order, S#state.event_order}, - {active_filter, S#state.active_filter} - | S#state.filters], - case et_gs_contents_viewer:start_link(Options) of - {ok, _Pid} -> - S; - {error, Reason} -> - ok = error_logger:format("~p(~p): create_contents_window(~p) ->~n ~p~n", - [?MODULE, self(), Options, Reason]), - S - end. - -%%%---------------------------------------------------------------------- -%%% String padding of actors -%%%---------------------------------------------------------------------- - -create_actor(Name) -> - String = name_to_string(Name), - PaddedString = pad_string(String, 8), - #actor{name = Name, string = PaddedString}. - -name_to_string(Name) -> - case catch io_lib:format("~s", [Name]) of - {'EXIT', _} -> lists:flatten(io_lib:format("~w", [Name])); - GoodString -> lists:flatten(GoodString) - end. - -pad_string(Atom, MinLen) when is_atom(Atom) -> - pad_string(atom_to_list(Atom), MinLen); -pad_string(String, MinLen) when is_integer(MinLen), MinLen >= 0 -> - Len = length(String), - case Len >= MinLen of - true -> - String; - false -> - String ++ lists:duplicate(MinLen - Len, $ ) - end. - -%%%---------------------------------------------------------------------- -%%% Queue management -%%%---------------------------------------------------------------------- - -queue_new() -> - {0, [], []}. - -queue_in(X, {Size, In, Out}) -> - {Size + 1, [X | In], Out}. - -%% queue_out(Q) -> -%% case Q of -%% {Size, In, [H | Out]} -> {{value, H}, {Size - 1, In, Out}}; -%% {Size, [], []} -> {empty, {Size, [], []}}; -%% {Size, In, _} -> queue_out({Size, [], lists:reverse(In)}) -%% end. - -queue_to_list({_Size, [], Out}) -> - Out; -queue_to_list({_Size, In, Out}) -> - Out ++ lists:reverse(In). - -queue_length({Size, _In, _Out}) -> - Size. - -list_to_queue(List) when is_list(List) -> - {length(List), [], List}. diff --git a/lib/et/src/et_viewer.erl b/lib/et/src/et_viewer.erl index d9bd01f8d0..ead5639da6 100644 --- a/lib/et/src/et_viewer.erl +++ b/lib/et/src/et_viewer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2010. All Rights Reserved. +%% Copyright Ericsson AB 2000-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -76,7 +76,7 @@ start() -> %% start(Options) -> {ok, ViewerPid} | {error, Reason} %%---------------------------------------------------------------------- -start(GUI) when GUI =:= wx; GUI =:= gs; GUI =:= default -> +start(GUI) when GUI =:= wx; GUI =:= default -> start_link([{trace_global, true}], GUI); start(Options) -> start_link([{parent_pid, undefined} | Options], default). @@ -139,7 +139,7 @@ start(Options, GUI) -> %% and returns false | true | {true, NewEvent}. %%---------------------------------------------------------------------- -start_link(GUI) when GUI =:= wx; GUI =:= gs; GUI =:= default -> +start_link(GUI) when GUI =:= wx; GUI =:= default -> start_link([{trace_global, true}], GUI); start_link(Options) -> start_link(Options, default). @@ -148,22 +148,11 @@ start_link(Options, GUI) -> case GUI of wx -> et_wx_viewer:start_link(Options); - gs -> - et_gs_viewer:start_link(Options); default -> start_link(Options, which_gui()) end. - -which_gui() -> - try - wx:new(), - wx:destroy(), - wx - catch _:_ -> - gs - end. - +which_gui() -> wx. get_collector_pid(ViewerPid) -> call(ViewerPid, get_collector_pid). diff --git a/lib/et/src/modules.mk b/lib/et/src/modules.mk index 8d6c0902fb..b2d2f0b481 100644 --- a/lib/et/src/modules.mk +++ b/lib/et/src/modules.mk @@ -1,7 +1,7 @@ #-*-makefile-*- ; force emacs to enter makefile-mode # %CopyrightBegin% # -# Copyright Ericsson AB 2001-2010. All Rights Reserved. +# Copyright Ericsson AB 2001-2013. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -19,8 +19,6 @@ MODULES = \ et \ et_collector \ - et_gs_contents_viewer \ - et_gs_viewer \ et_selector \ et_viewer \ et_wx_contents_viewer \ -- cgit v1.2.3 From a61f66e1157b0e77839b76ef416f436f28304579 Mon Sep 17 00:00:00 2001 From: Tobias Schlager Date: Tue, 18 Feb 2014 12:29:01 +0100 Subject: Fix library application appup files As discussed in issue #240 *all* OTP library applications use the '.*' wildcard as up and down version. This makes library applications always up- and downgradeable. Using the wildcard version obsoletes all maintenance tasks regarding library applications' appup files. Additionally, it prevents upgrade problems caused by automatically included application dependencies when using reltool to create releases. Missing copyright headers are now consistently present. --- lib/et/src/et.appup.src | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/et') diff --git a/lib/et/src/et.appup.src b/lib/et/src/et.appup.src index b6344a9387..5f15b00386 100644 --- a/lib/et/src/et.appup.src +++ b/lib/et/src/et.appup.src @@ -1,8 +1,7 @@ -%% This is an -*- erlang -*- file. -%% +%% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2009. All Rights Reserved. +%% Copyright Ericsson AB 2002-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -16,8 +15,7 @@ %% under the License. %% %% %CopyrightEnd% - {"%VSN%", - [ ] + [{<<".*">>,[{restart_application, et}]}], + [{<<".*">>,[{restart_application, et}]}] }. - -- cgit v1.2.3 From 841addf5d64a3b4775cd1d0a5aa4bf04ec4ef95e Mon Sep 17 00:00:00 2001 From: Tobias Schlager Date: Tue, 18 Feb 2014 12:33:31 +0100 Subject: Add test suites performing app and appup file checks Add the mentioned test suites for *all* library and touched non-library applications. --- lib/et/test/Makefile | 1 + lib/et/test/et_SUITE.erl | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 lib/et/test/et_SUITE.erl (limited to 'lib/et') diff --git a/lib/et/test/Makefile b/lib/et/test/Makefile index 3817079b5f..1be5aac3fd 100644 --- a/lib/et/test/Makefile +++ b/lib/et/test/Makefile @@ -25,6 +25,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk MODULES= \ ett \ + et_SUITE \ et_wx_SUITE \ et_test_lib diff --git a/lib/et/test/et_SUITE.erl b/lib/et/test/et_SUITE.erl new file mode 100644 index 0000000000..e0bce41e15 --- /dev/null +++ b/lib/et/test/et_SUITE.erl @@ -0,0 +1,50 @@ +%% ``The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved via the world wide web at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. +%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings +%% AB. All Rights Reserved.'' +%% +-module(et_SUITE). + +-compile([export_all]). +-include_lib("common_test/include/ct.hrl"). + +suite() -> + [{ct_hooks, [ts_install_cth]}]. + +all() -> + [app, appup]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + +app() -> + [{doc, "Test that the et app file is ok"}]. +app(Config) when is_list(Config) -> + ok = ?t:app_test(et). + +appup() -> + [{doc, "Test that the et appup file is ok"}]. +appup(Config) when is_list(Config) -> + ok = ?t:appup_test(et). -- cgit v1.2.3 From 7bc03971cfe09a2acbcd3bdaef1069af6272b127 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 10 Mar 2014 17:11:58 +0100 Subject: Bump versions and ensure that all are "normal" versions Ensure all are "normal" versions according to the new version scheme introduced in OTP 17.0 --- lib/et/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index 282991aa49..a47be678ca 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.4.4.5 +ET_VSN = 1.5 -- cgit v1.2.3 From 22ff87a0c8db877e3ce53b6ff915dcc6a75c5c0c Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 10 Mar 2014 17:15:38 +0100 Subject: Introduce runtime_dependencies in .app files Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies. --- lib/et/src/et.app.src | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src index f7189a4197..c26d9320d8 100644 --- a/lib/et/src/et.app.src +++ b/lib/et/src/et.app.src @@ -31,5 +31,7 @@ ]}, {registered, [et_collector]}, {applications, [stdlib, kernel]}, - {env, []} + {env, []}, + {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.8.14", + "kernel-3.0","erts-6.0"]} ]}. -- cgit v1.2.3 From f719d0fe308f00b85f92c29d7cdf9b0dc20d98a2 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 7 Apr 2014 19:52:48 +0200 Subject: Update release notes --- lib/et/doc/src/notes.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 815dfada5e..e122187cf3 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -36,6 +36,51 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

+
ET 1.5 + +
Fixed Bugs and Malfunctions + + +

+ Application upgrade (appup) files are corrected for the + following applications:

+

+ asn1, common_test, compiler, crypto, debugger, + dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe, + inets, observer, odbc, os_mon, otp_mibs, parsetools, + percept, public_key, reltool, runtime_tools, ssh, + syntax_tools, test_server, tools, typer, webtool, wx, + xmerl

+

+ A new test utility for testing appup files is added to + test_server. This is now used by most applications in + OTP.

+

+ (Thanks to Tobias Schlager)

+

+ Own Id: OTP-11744

+
+
+
+ + +
Improvements and New Features + + +

+ Removed gs based applications and gs based backends. The + observer application replaces the removed + applications.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-10915

+
+
+
+ +
+
ET 1.4.4.5
Improvements and New Features -- cgit v1.2.3 From 341e4dad9c2577be3af4314f9778ad41df0a5aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 25 May 2015 14:21:57 +0200 Subject: et: Eliminate warnings for deprecated erlang:now/0 et analyses trace messages, and since trace message with timestamps still always are based on erlang:now/0, we must keep the calls to erlang:now/0 but suppress the warnings. --- lib/et/src/et_collector.erl | 2 ++ lib/et/src/et_selector.erl | 2 ++ 2 files changed, 4 insertions(+) (limited to 'lib/et') diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl index e05c67be60..1f60dee8ca 100644 --- a/lib/et/src/et_collector.erl +++ b/lib/et/src/et_collector.erl @@ -64,6 +64,8 @@ -export([init/1,terminate/2, code_change/3, handle_call/3, handle_cast/2, handle_info/2]). +-compile([{nowarn_deprecated_function,[{erlang,now,0}]}]). + -include("et_internal.hrl"). -include("../include/et.hrl"). diff --git a/lib/et/src/et_selector.erl b/lib/et/src/et_selector.erl index c8e9c907b2..5497096377 100644 --- a/lib/et/src/et_selector.erl +++ b/lib/et/src/et_selector.erl @@ -28,6 +28,8 @@ parse_event/2 ]). +-compile([{nowarn_deprecated_function,[{erlang,now,0}]}]). + -include("../include/et.hrl"). %%---------------------------------------------------------------------- -- cgit v1.2.3 From 0d7646d6a2d52a75ed694c5114496b880ffb4224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 25 May 2015 14:27:31 +0200 Subject: Makefile: no longer tolerate warnings in the et application --- lib/et/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile index 377e593712..b6873371ed 100644 --- a/lib/et/src/Makefile +++ b/lib/et/src/Makefile @@ -65,7 +65,7 @@ APPUP_TARGET = $(EBIN)/$(APPUP_FILE) # ---------------------------------------------------- # FLAGS # ---------------------------------------------------- -ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/et/ebin -I../include +ERL_COMPILE_FLAGS += -pa $(ERL_TOP)/lib/et/ebin -I../include -Werror # ---------------------------------------------------- # Special Build Targets -- cgit v1.2.3 From 738c34d4bb8f1a3811acd00af8c6c12107f8315b Mon Sep 17 00:00:00 2001 From: Bruce Yinhe Date: Thu, 18 Jun 2015 11:31:02 +0200 Subject: Change license text to APLv2 --- lib/et/Makefile | 21 +++++++++++---------- lib/et/doc/src/Makefile | 19 ++++++++++--------- lib/et/doc/src/book.xml | 21 +++++++++++---------- lib/et/doc/src/et.xml | 19 ++++++++++--------- lib/et/doc/src/et_collector.xml | 19 ++++++++++--------- lib/et/doc/src/et_desc.xmlsrc | 21 +++++++++++---------- lib/et/doc/src/et_examples.xmlsrc | 21 +++++++++++---------- lib/et/doc/src/et_intro.xml | 21 +++++++++++---------- lib/et/doc/src/et_selector.xml | 21 +++++++++++---------- lib/et/doc/src/et_tutorial.xmlsrc | 21 +++++++++++---------- lib/et/doc/src/et_viewer.xml | 19 ++++++++++--------- lib/et/doc/src/files.mk | 19 ++++++++++--------- lib/et/doc/src/notes.xml | 21 +++++++++++---------- lib/et/doc/src/part.xml | 19 ++++++++++--------- lib/et/doc/src/ref_man.xml | 21 +++++++++++---------- lib/et/examples/Makefile | 19 ++++++++++--------- lib/et/examples/et_demo.erl | 19 ++++++++++--------- lib/et/include/et.hrl | 21 +++++++++++---------- lib/et/src/Makefile | 19 ++++++++++--------- lib/et/src/et.app.src | 19 ++++++++++--------- lib/et/src/et.appup.src | 21 +++++++++++---------- lib/et/src/et.erl | 21 +++++++++++---------- lib/et/src/et_collector.erl | 19 ++++++++++--------- lib/et/src/et_internal.hrl | 19 ++++++++++--------- lib/et/src/et_selector.erl | 19 ++++++++++--------- lib/et/src/et_viewer.erl | 19 ++++++++++--------- lib/et/src/et_wx_contents_viewer.erl | 21 +++++++++++---------- lib/et/src/et_wx_viewer.erl | 21 +++++++++++---------- lib/et/src/modules.mk | 19 ++++++++++--------- lib/et/subdirs.mk | 21 +++++++++++---------- lib/et/test/Makefile | 19 ++++++++++--------- lib/et/test/et_SUITE.erl | 19 ++++++++++--------- lib/et/test/et_test_lib.erl | 19 ++++++++++--------- lib/et/test/et_test_lib.hrl | 19 ++++++++++--------- lib/et/test/et_wx_SUITE.erl | 19 ++++++++++--------- lib/et/test/ett | 19 ++++++++++--------- lib/et/test/ett.erl | 19 ++++++++++--------- 37 files changed, 385 insertions(+), 348 deletions(-) (limited to 'lib/et') diff --git a/lib/et/Makefile b/lib/et/Makefile index 1b3476897e..b93ebef902 100644 --- a/lib/et/Makefile +++ b/lib/et/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2002-2009. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% # diff --git a/lib/et/doc/src/Makefile b/lib/et/doc/src/Makefile index 249d45fa52..532e28f5d3 100644 --- a/lib/et/doc/src/Makefile +++ b/lib/et/doc/src/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2002-2012. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% # diff --git a/lib/et/doc/src/book.xml b/lib/et/doc/src/book.xml index 6c78f2ca07..d3fef1752c 100644 --- a/lib/et/doc/src/book.xml +++ b/lib/et/doc/src/book.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et.xml b/lib/et/doc/src/et.xml index f1f74df1b1..0ba858cc08 100644 --- a/lib/et/doc/src/et.xml +++ b/lib/et/doc/src/et.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + 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 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_collector.xml b/lib/et/doc/src/et_collector.xml index 8b4592ac63..e879a119a5 100644 --- a/lib/et/doc/src/et_collector.xml +++ b/lib/et/doc/src/et_collector.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + 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 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_desc.xmlsrc b/lib/et/doc/src/et_desc.xmlsrc index a4240db2ba..cbb41f700c 100644 --- a/lib/et/doc/src/et_desc.xmlsrc +++ b/lib/et/doc/src/et_desc.xmlsrc @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_examples.xmlsrc b/lib/et/doc/src/et_examples.xmlsrc index 3bd95bcb06..42e484a241 100644 --- a/lib/et/doc/src/et_examples.xmlsrc +++ b/lib/et/doc/src/et_examples.xmlsrc @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_intro.xml b/lib/et/doc/src/et_intro.xml index 62cc291d4c..cfc879e43d 100644 --- a/lib/et/doc/src/et_intro.xml +++ b/lib/et/doc/src/et_intro.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_selector.xml b/lib/et/doc/src/et_selector.xml index 72392fdfe4..af62401287 100644 --- a/lib/et/doc/src/et_selector.xml +++ b/lib/et/doc/src/et_selector.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_tutorial.xmlsrc b/lib/et/doc/src/et_tutorial.xmlsrc index 02c303f66e..6e3b327ee7 100644 --- a/lib/et/doc/src/et_tutorial.xmlsrc +++ b/lib/et/doc/src/et_tutorial.xmlsrc @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/et_viewer.xml b/lib/et/doc/src/et_viewer.xml index 695725f281..c7917b41ce 100644 --- a/lib/et/doc/src/et_viewer.xml +++ b/lib/et/doc/src/et_viewer.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + 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 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/files.mk b/lib/et/doc/src/files.mk index 41fffb83f1..c8721c61fe 100644 --- a/lib/et/doc/src/files.mk +++ b/lib/et/doc/src/files.mk @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2002-2010. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index e122187cf3..6b683d6a55 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/part.xml b/lib/et/doc/src/part.xml index 7048e3a401..d8e5e76685 100644 --- a/lib/et/doc/src/part.xml +++ b/lib/et/doc/src/part.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. + 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 - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/doc/src/ref_man.xml b/lib/et/doc/src/ref_man.xml index 47706339b6..68ed5a8756 100644 --- a/lib/et/doc/src/ref_man.xml +++ b/lib/et/doc/src/ref_man.xml @@ -8,16 +8,17 @@ Ericsson AB. All Rights Reserved. - The contents of this file are subject to the Erlang Public License, - Version 1.1, (the "License"); you may not use this file except in - compliance with the License. You should have received a copy of the - Erlang Public License along with this software. If not, it can be - retrieved online at http://www.erlang.org/. - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and limitations - under the License. + 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. diff --git a/lib/et/examples/Makefile b/lib/et/examples/Makefile index 3edbebc2e4..215ce6e4cd 100644 --- a/lib/et/examples/Makefile +++ b/lib/et/examples/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2002-2012. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% # diff --git a/lib/et/examples/et_demo.erl b/lib/et/examples/et_demo.erl index e439e6882c..e2a604b451 100644 --- a/lib/et/examples/et_demo.erl +++ b/lib/et/examples/et_demo.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2002-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/include/et.hrl b/lib/et/include/et.hrl index b2cb7d17c3..450044df42 100644 --- a/lib/et/include/et.hrl +++ b/lib/et/include/et.hrl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2000-2009. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile index b6873371ed..461a52d480 100644 --- a/lib/et/src/Makefile +++ b/lib/et/src/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2000-2013. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% # diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src index c26d9320d8..ddf86beea3 100644 --- a/lib/et/src/et.app.src +++ b/lib/et/src/et.app.src @@ -4,16 +4,17 @@ %% %% Copyright Ericsson AB 2002-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% diff --git a/lib/et/src/et.appup.src b/lib/et/src/et.appup.src index 5f15b00386..0fbde99762 100644 --- a/lib/et/src/et.appup.src +++ b/lib/et/src/et.appup.src @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2002-2014. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% {"%VSN%", diff --git a/lib/et/src/et.erl b/lib/et/src/et.erl index c9ba4f6816..d38fe917c8 100644 --- a/lib/et/src/et.erl +++ b/lib/et/src/et.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2000-2012. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl index 1f60dee8ca..56e59461b2 100644 --- a/lib/et/src/et_collector.erl +++ b/lib/et/src/et_collector.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2000-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/et_internal.hrl b/lib/et/src/et_internal.hrl index 419d35afcd..01c7303d0b 100644 --- a/lib/et/src/et_internal.hrl +++ b/lib/et/src/et_internal.hrl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2002-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/et_selector.erl b/lib/et/src/et_selector.erl index 5497096377..708a0b4cd8 100644 --- a/lib/et/src/et_selector.erl +++ b/lib/et/src/et_selector.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2001-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/et_viewer.erl b/lib/et/src/et_viewer.erl index ead5639da6..1a962df147 100644 --- a/lib/et/src/et_viewer.erl +++ b/lib/et/src/et_viewer.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2000-2013. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/et_wx_contents_viewer.erl b/lib/et/src/et_wx_contents_viewer.erl index b559da8807..46898c6fbf 100644 --- a/lib/et/src/et_wx_contents_viewer.erl +++ b/lib/et/src/et_wx_contents_viewer.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2000-2012. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/et_wx_viewer.erl b/lib/et/src/et_wx_viewer.erl index 386f8fc86b..1e71880b79 100644 --- a/lib/et/src/et_wx_viewer.erl +++ b/lib/et/src/et_wx_viewer.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2000-2011. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% %% diff --git a/lib/et/src/modules.mk b/lib/et/src/modules.mk index b2d2f0b481..0568306b65 100644 --- a/lib/et/src/modules.mk +++ b/lib/et/src/modules.mk @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2001-2013. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% diff --git a/lib/et/subdirs.mk b/lib/et/subdirs.mk index d6382463e3..6568459be1 100644 --- a/lib/et/subdirs.mk +++ b/lib/et/subdirs.mk @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2002-2009. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% diff --git a/lib/et/test/Makefile b/lib/et/test/Makefile index 1be5aac3fd..0434d4ebfd 100644 --- a/lib/et/test/Makefile +++ b/lib/et/test/Makefile @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2009-2012. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% diff --git a/lib/et/test/et_SUITE.erl b/lib/et/test/et_SUITE.erl index e0bce41e15..4a26b46439 100644 --- a/lib/et/test/et_SUITE.erl +++ b/lib/et/test/et_SUITE.erl @@ -1,13 +1,14 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. +%% ``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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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 Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings diff --git a/lib/et/test/et_test_lib.erl b/lib/et/test/et_test_lib.erl index c1bfeb9fc0..6e252de4e5 100644 --- a/lib/et/test/et_test_lib.erl +++ b/lib/et/test/et_test_lib.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2009-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% diff --git a/lib/et/test/et_test_lib.hrl b/lib/et/test/et_test_lib.hrl index 0d75318d99..9f2a432e04 100644 --- a/lib/et/test/et_test_lib.hrl +++ b/lib/et/test/et_test_lib.hrl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2009-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% diff --git a/lib/et/test/et_wx_SUITE.erl b/lib/et/test/et_wx_SUITE.erl index b5f98f8616..165a2bca49 100644 --- a/lib/et/test/et_wx_SUITE.erl +++ b/lib/et/test/et_wx_SUITE.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% diff --git a/lib/et/test/ett b/lib/et/test/ett index da2443df61..53aaeada55 100755 --- a/lib/et/test/ett +++ b/lib/et/test/ett @@ -3,16 +3,17 @@ # # Copyright Ericsson AB 2009-2010. All Rights Reserved. # -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. +# 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 # -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. +# 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. # # %CopyrightEnd% diff --git a/lib/et/test/ett.erl b/lib/et/test/ett.erl index 1896e65842..e78f6c392e 100644 --- a/lib/et/test/ett.erl +++ b/lib/et/test/ett.erl @@ -3,16 +3,17 @@ %% %% Copyright Ericsson AB 2009-2010. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% 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 %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% 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. %% %% %CopyrightEnd% -- cgit v1.2.3 From 2955ddebc32837b66d9bacb4e925ad0ed0033168 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 23 Jun 2015 10:24:26 +0200 Subject: Prepare release --- lib/et/doc/src/notes.xml | 18 ++++++++++++++++++ lib/et/vsn.mk | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 6b683d6a55..6599025d52 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -37,6 +37,24 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

+
ET 1.5.1 + +
Fixed Bugs and Malfunctions + + +

The et application must continue to use + erlang:now/0 in order to obtain timestamps that + are consistent with timestamps obtained from tracing. The + application has been updated to suppress the warning for + erlang:now/0.

+

+ Own Id: OTP-12780

+
+
+
+ +
+
ET 1.5
Fixed Bugs and Malfunctions diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index a47be678ca..0af7bf75e1 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.5 +ET_VSN = 1.5.1 -- cgit v1.2.3 From 6664eed554974336909d3ffe03f20349cc4c38fd Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Tue, 15 Mar 2016 15:19:56 +0100 Subject: update copyright-year --- lib/et/Makefile | 2 +- lib/et/doc/src/Makefile | 2 +- lib/et/doc/src/book.xml | 2 +- lib/et/doc/src/et.xml | 2 +- lib/et/doc/src/et_collector.xml | 2 +- lib/et/doc/src/et_desc.xmlsrc | 2 +- lib/et/doc/src/et_examples.xmlsrc | 2 +- lib/et/doc/src/et_intro.xml | 2 +- lib/et/doc/src/et_selector.xml | 2 +- lib/et/doc/src/et_tutorial.xmlsrc | 2 +- lib/et/doc/src/et_viewer.xml | 2 +- lib/et/doc/src/files.mk | 2 +- lib/et/doc/src/notes.xml | 2 +- lib/et/doc/src/part.xml | 2 +- lib/et/doc/src/ref_man.xml | 2 +- lib/et/examples/Makefile | 2 +- lib/et/examples/et_demo.erl | 2 +- lib/et/include/et.hrl | 2 +- lib/et/src/Makefile | 2 +- lib/et/src/et.app.src | 2 +- lib/et/src/et.appup.src | 2 +- lib/et/src/et.erl | 2 +- lib/et/src/et_collector.erl | 2 +- lib/et/src/et_internal.hrl | 2 +- lib/et/src/et_selector.erl | 2 +- lib/et/src/et_viewer.erl | 2 +- lib/et/src/et_wx_contents_viewer.erl | 2 +- lib/et/src/et_wx_viewer.erl | 2 +- lib/et/src/modules.mk | 2 +- lib/et/subdirs.mk | 2 +- lib/et/test/Makefile | 2 +- lib/et/test/et_test_lib.erl | 2 +- lib/et/test/et_test_lib.hrl | 2 +- lib/et/test/et_wx_SUITE.erl | 2 +- lib/et/test/ett | 2 +- lib/et/test/ett.erl | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'lib/et') diff --git a/lib/et/Makefile b/lib/et/Makefile index b93ebef902..f0bb7be211 100644 --- a/lib/et/Makefile +++ b/lib/et/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2009. All Rights Reserved. +# Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/doc/src/Makefile b/lib/et/doc/src/Makefile index 532e28f5d3..0257a8f817 100644 --- a/lib/et/doc/src/Makefile +++ b/lib/et/doc/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2012. All Rights Reserved. +# Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/doc/src/book.xml b/lib/et/doc/src/book.xml index d3fef1752c..5dddb44454 100644 --- a/lib/et/doc/src/book.xml +++ b/lib/et/doc/src/book.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et.xml b/lib/et/doc/src/et.xml index 0ba858cc08..3009b559e1 100644 --- a/lib/et/doc/src/et.xml +++ b/lib/et/doc/src/et.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_collector.xml b/lib/et/doc/src/et_collector.xml index e879a119a5..6a85b81ec2 100644 --- a/lib/et/doc/src/et_collector.xml +++ b/lib/et/doc/src/et_collector.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_desc.xmlsrc b/lib/et/doc/src/et_desc.xmlsrc index cbb41f700c..96a4a9df31 100644 --- a/lib/et/doc/src/et_desc.xmlsrc +++ b/lib/et/doc/src/et_desc.xmlsrc @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_examples.xmlsrc b/lib/et/doc/src/et_examples.xmlsrc index 42e484a241..6f143a397e 100644 --- a/lib/et/doc/src/et_examples.xmlsrc +++ b/lib/et/doc/src/et_examples.xmlsrc @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_intro.xml b/lib/et/doc/src/et_intro.xml index cfc879e43d..729f95647d 100644 --- a/lib/et/doc/src/et_intro.xml +++ b/lib/et/doc/src/et_intro.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_selector.xml b/lib/et/doc/src/et_selector.xml index af62401287..441a4dd278 100644 --- a/lib/et/doc/src/et_selector.xml +++ b/lib/et/doc/src/et_selector.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_tutorial.xmlsrc b/lib/et/doc/src/et_tutorial.xmlsrc index 6e3b327ee7..b5d1b815be 100644 --- a/lib/et/doc/src/et_tutorial.xmlsrc +++ b/lib/et/doc/src/et_tutorial.xmlsrc @@ -4,7 +4,7 @@
- 20092013 + 20092016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/et_viewer.xml b/lib/et/doc/src/et_viewer.xml index c7917b41ce..e0b39636e9 100644 --- a/lib/et/doc/src/et_viewer.xml +++ b/lib/et/doc/src/et_viewer.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/files.mk b/lib/et/doc/src/files.mk index c8721c61fe..e0ea9b0b76 100644 --- a/lib/et/doc/src/files.mk +++ b/lib/et/doc/src/files.mk @@ -1,7 +1,7 @@ #-*-makefile-*- ; force emacs to enter makefile-mode # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2010. All Rights Reserved. +# Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 6599025d52..ee9e34d14d 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/part.xml b/lib/et/doc/src/part.xml index d8e5e76685..a282dc2c16 100644 --- a/lib/et/doc/src/part.xml +++ b/lib/et/doc/src/part.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/doc/src/ref_man.xml b/lib/et/doc/src/ref_man.xml index 68ed5a8756..bf131bef85 100644 --- a/lib/et/doc/src/ref_man.xml +++ b/lib/et/doc/src/ref_man.xml @@ -4,7 +4,7 @@
- 20022013 + 20022016 Ericsson AB. All Rights Reserved. diff --git a/lib/et/examples/Makefile b/lib/et/examples/Makefile index 215ce6e4cd..fe6811e45d 100644 --- a/lib/et/examples/Makefile +++ b/lib/et/examples/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2012. All Rights Reserved. +# Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/examples/et_demo.erl b/lib/et/examples/et_demo.erl index e2a604b451..b0fb29e7c6 100644 --- a/lib/et/examples/et_demo.erl +++ b/lib/et/examples/et_demo.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2010. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/include/et.hrl b/lib/et/include/et.hrl index 450044df42..75e82a5c85 100644 --- a/lib/et/include/et.hrl +++ b/lib/et/include/et.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2009. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile index 461a52d480..b6347d8b6d 100644 --- a/lib/et/src/Makefile +++ b/lib/et/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2000-2013. All Rights Reserved. +# Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src index ddf86beea3..77b9488c7e 100644 --- a/lib/et/src/et.app.src +++ b/lib/et/src/et.app.src @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2013. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/src/et.appup.src b/lib/et/src/et.appup.src index 0fbde99762..491c039ffe 100644 --- a/lib/et/src/et.appup.src +++ b/lib/et/src/et.appup.src @@ -1,7 +1,7 @@ %% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2014. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/src/et.erl b/lib/et/src/et.erl index d38fe917c8..91c17ffdc9 100644 --- a/lib/et/src/et.erl +++ b/lib/et/src/et.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2012. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl index 56e59461b2..b8916c0eb9 100644 --- a/lib/et/src/et_collector.erl +++ b/lib/et/src/et_collector.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2013. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/et_internal.hrl b/lib/et/src/et_internal.hrl index 01c7303d0b..fdcd6f3dcc 100644 --- a/lib/et/src/et_internal.hrl +++ b/lib/et/src/et_internal.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2010. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/src/et_selector.erl b/lib/et/src/et_selector.erl index 708a0b4cd8..0e2d7010cd 100644 --- a/lib/et/src/et_selector.erl +++ b/lib/et/src/et_selector.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2010. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. 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. diff --git a/lib/et/src/et_viewer.erl b/lib/et/src/et_viewer.erl index 1a962df147..3928764c7f 100644 --- a/lib/et/src/et_viewer.erl +++ b/lib/et/src/et_viewer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2013. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/et_wx_contents_viewer.erl b/lib/et/src/et_wx_contents_viewer.erl index 46898c6fbf..d5347a43db 100644 --- a/lib/et/src/et_wx_contents_viewer.erl +++ b/lib/et/src/et_wx_contents_viewer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2012. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/et_wx_viewer.erl b/lib/et/src/et_wx_viewer.erl index 1e71880b79..0fc10cb37b 100644 --- a/lib/et/src/et_wx_viewer.erl +++ b/lib/et/src/et_wx_viewer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2011. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. 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. diff --git a/lib/et/src/modules.mk b/lib/et/src/modules.mk index 0568306b65..4d538fae44 100644 --- a/lib/et/src/modules.mk +++ b/lib/et/src/modules.mk @@ -1,7 +1,7 @@ #-*-makefile-*- ; force emacs to enter makefile-mode # %CopyrightBegin% # -# Copyright Ericsson AB 2001-2013. All Rights Reserved. +# Copyright Ericsson AB 2001-2016. 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. diff --git a/lib/et/subdirs.mk b/lib/et/subdirs.mk index 6568459be1..fb7fb8dbc9 100644 --- a/lib/et/subdirs.mk +++ b/lib/et/subdirs.mk @@ -1,7 +1,7 @@ #-*-makefile-*- ; force emacs to enter makefile-mode # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2009. All Rights Reserved. +# Copyright Ericsson AB 2002-2016. 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. diff --git a/lib/et/test/Makefile b/lib/et/test/Makefile index 0434d4ebfd..45ea2c2ce0 100644 --- a/lib/et/test/Makefile +++ b/lib/et/test/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2009-2012. All Rights Reserved. +# Copyright Ericsson AB 2009-2016. 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. diff --git a/lib/et/test/et_test_lib.erl b/lib/et/test/et_test_lib.erl index 6e252de4e5..df2c308b28 100644 --- a/lib/et/test/et_test_lib.erl +++ b/lib/et/test/et_test_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2010. All Rights Reserved. +%% Copyright Ericsson AB 2009-2016. 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. diff --git a/lib/et/test/et_test_lib.hrl b/lib/et/test/et_test_lib.hrl index 9f2a432e04..ee1a72d991 100644 --- a/lib/et/test/et_test_lib.hrl +++ b/lib/et/test/et_test_lib.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2010. All Rights Reserved. +%% Copyright Ericsson AB 2009-2016. 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. diff --git a/lib/et/test/et_wx_SUITE.erl b/lib/et/test/et_wx_SUITE.erl index 165a2bca49..785d1b8145 100644 --- a/lib/et/test/et_wx_SUITE.erl +++ b/lib/et/test/et_wx_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% Copyright Ericsson AB 2009-2016. 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. diff --git a/lib/et/test/ett b/lib/et/test/ett index 53aaeada55..c5b89ea367 100755 --- a/lib/et/test/ett +++ b/lib/et/test/ett @@ -1,7 +1,7 @@ #! /bin/sh -f # %CopyrightBegin% # -# Copyright Ericsson AB 2009-2010. All Rights Reserved. +# Copyright Ericsson AB 2009-2016. 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. diff --git a/lib/et/test/ett.erl b/lib/et/test/ett.erl index e78f6c392e..b1b769b7ac 100644 --- a/lib/et/test/ett.erl +++ b/lib/et/test/ett.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2010. All Rights Reserved. +%% Copyright Ericsson AB 2009-2016. 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. -- cgit v1.2.3 From d8028da128c4382fdc5781df70a9ca5d56f38694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Tue, 3 May 2016 16:24:02 +0200 Subject: et: Remove unnecessary boilerplate in tests --- lib/et/test/et_SUITE.erl | 24 ++++-------------------- lib/et/test/et_wx_SUITE.erl | 23 +++++++---------------- 2 files changed, 11 insertions(+), 36 deletions(-) (limited to 'lib/et') diff --git a/lib/et/test/et_SUITE.erl b/lib/et/test/et_SUITE.erl index 4a26b46439..199aff43a8 100644 --- a/lib/et/test/et_SUITE.erl +++ b/lib/et/test/et_SUITE.erl @@ -16,7 +16,8 @@ %% -module(et_SUITE). --compile([export_all]). +-export([suite/0, all/0]). +-export([app/1, appup/1]). -include_lib("common_test/include/ct.hrl"). suite() -> @@ -25,27 +26,10 @@ suite() -> all() -> [app, appup]. -groups() -> - []. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - -app() -> - [{doc, "Test that the et app file is ok"}]. +%% Test that the et app file is ok app(Config) when is_list(Config) -> ok = ?t:app_test(et). -appup() -> - [{doc, "Test that the et appup file is ok"}]. +%% Test that the et appup file is ok appup(Config) when is_list(Config) -> ok = ?t:appup_test(et). diff --git a/lib/et/test/et_wx_SUITE.erl b/lib/et/test/et_wx_SUITE.erl index 785d1b8145..6475b6706b 100644 --- a/lib/et/test/et_wx_SUITE.erl +++ b/lib/et/test/et_wx_SUITE.erl @@ -19,11 +19,10 @@ -module(et_wx_SUITE). --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, - init_per_suite/1, end_per_suite/1, - init_per_testcase/2, end_per_testcase/2]). - --compile(export_all). +-export([all/0, suite/0, + init_per_testcase/2, end_per_testcase/2, + init_per_suite/1, end_per_suite/1]). +-export([start_all_windows/1]). -include("et_test_lib.hrl"). @@ -40,21 +39,13 @@ end_per_testcase(Func,Config) -> et_test_lib:end_per_testcase(Func,Config). %% SUITE specification -suite() -> [{ct_hooks,[ts_install_cth]}]. + +suite() -> + [{ct_hooks,[ts_install_cth]}]. all() -> [start_all_windows]. -groups() -> - []. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - %% The test cases %% Display all windows and see if something crashes -- cgit v1.2.3 From b11ec1d80234d7aebf611dce57215c61dfe1c52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Tue, 3 May 2016 17:38:55 +0200 Subject: et: Update gc trace tags in selector --- lib/et/src/et_selector.erl | 46 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) (limited to 'lib/et') diff --git a/lib/et/src/et_selector.erl b/lib/et/src/et_selector.erl index 0e2d7010cd..a0297c21d1 100644 --- a/lib/et/src/et_selector.erl +++ b/lib/et/src/et_selector.erl @@ -23,11 +23,9 @@ -module(et_selector). --export([ - make_pattern/1, +-export([make_pattern/1, change_pattern/1, - parse_event/2 - ]). + parse_event/2]). -compile([{nowarn_deprecated_function,[{erlang,now,0}]}]). @@ -535,7 +533,7 @@ parse_event(Mod, Trace, ParsedTS, ReportedTS, From, Label, Contents) -> {from, From}, {to, From}, {mfa, MFA}]}}; % MFA | 0 - gc_start -> + gc_minor_start -> DetailLevel = 80, [GcKeyValueList] = Contents, {true, #event{detail_level = DetailLevel, @@ -549,7 +547,7 @@ parse_event(Mod, Trace, ParsedTS, ReportedTS, From, Label, Contents) -> {from, From}, {to, From}, {gc_items, GcKeyValueList}]}}; - gc_end -> + gc_minor_end -> DetailLevel = 85, [GcKeyValueList] = Contents, {true, #event{detail_level = DetailLevel, @@ -559,10 +557,38 @@ parse_event(Mod, Trace, ParsedTS, ReportedTS, From, Label, Contents) -> to = From, label = Label, contents = [{label, Label}, - {detail_level, DetailLevel}, - {from, From}, - {to, From}, - {gc_items, GcKeyValueList}]}}; + {detail_level, DetailLevel}, + {from, From}, + {to, From}, + {gc_items, GcKeyValueList}]}}; + gc_major_start -> + DetailLevel = 80, + [GcKeyValueList] = Contents, + {true, #event{detail_level = DetailLevel, + trace_ts = ReportedTS, + event_ts = ParsedTS, + from = From, + to = From, + label = Label, + contents = [{label, Label}, + {detail_level, DetailLevel}, + {from, From}, + {to, From}, + {gc_items, GcKeyValueList}]}}; + gc_major_end -> + DetailLevel = 85, + [GcKeyValueList] = Contents, + {true, #event{detail_level = DetailLevel, + trace_ts = ReportedTS, + event_ts = ParsedTS, + from = From, + to = From, + label = Label, + contents = [{label, Label}, + {detail_level, DetailLevel}, + {from, From}, + {to, From}, + {gc_items, GcKeyValueList}]}}; _ -> error_logger:format("~p(~p): Ignoring unknown trace type -> ~p~n~n", [?MODULE, ?LINE, Trace]), -- cgit v1.2.3 From 5449073a9a78b0b0a387852b6c596a9ab9dea1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Tue, 3 May 2016 17:40:04 +0200 Subject: et: Update runtime dependencies --- lib/et/src/et.app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/et') diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src index 77b9488c7e..7a5928d6ab 100644 --- a/lib/et/src/et.app.src +++ b/lib/et/src/et.app.src @@ -33,6 +33,6 @@ {registered, [et_collector]}, {applications, [stdlib, kernel]}, {env, []}, - {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.8.14", - "kernel-3.0","erts-6.0"]} + {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.10", + "kernel-3.0","erts-8.0"]} ]}. -- cgit v1.2.3 From bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 11 May 2016 17:22:23 +0200 Subject: Prepare release --- lib/et/doc/src/notes.xml | 16 ++++++++++++++++ lib/et/vsn.mk | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index ee9e34d14d..5300d2e4ef 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -37,6 +37,22 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

+
ET 1.6 + +
Improvements and New Features + + +

+ Update selector to utilize new garbage collection trace + tags.

+

+ Own Id: OTP-13545

+
+
+
+ +
+
ET 1.5.1
Fixed Bugs and Malfunctions diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index 0af7bf75e1..a37fec083b 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.5.1 +ET_VSN = 1.6 -- cgit v1.2.3 From 663e847459686604ea051f036a0e4caff18cea6f Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 12 May 2016 12:04:14 +0200 Subject: Revert "Prepare release" This reverts commit bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a. --- lib/et/doc/src/notes.xml | 16 ---------------- lib/et/vsn.mk | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 5300d2e4ef..ee9e34d14d 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -37,22 +37,6 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

-
ET 1.6 - -
Improvements and New Features - - -

- Update selector to utilize new garbage collection trace - tags.

-

- Own Id: OTP-13545

-
-
-
- -
-
ET 1.5.1
Fixed Bugs and Malfunctions diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index a37fec083b..0af7bf75e1 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.6 +ET_VSN = 1.5.1 -- cgit v1.2.3 From 2aca845e65aa045095e8f3294b8e2fd2f4f0f747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 12 May 2016 20:05:58 +0200 Subject: et: Fix linting documentation xml tags --- lib/et/doc/src/et_desc.xmlsrc | 82 ++++++------ lib/et/doc/src/et_examples.xmlsrc | 255 ++++++++++++++++++-------------------- lib/et/doc/src/et_tutorial.xmlsrc | 13 +- 3 files changed, 162 insertions(+), 188 deletions(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/et_desc.xmlsrc b/lib/et/doc/src/et_desc.xmlsrc index 96a4a9df31..29e0ab1fe3 100644 --- a/lib/et/doc/src/et_desc.xmlsrc +++ b/lib/et/doc/src/et_desc.xmlsrc @@ -55,13 +55,12 @@

{ok, Viewer} = et_viewer:start([]). - {ok,<0.40.0>}]]> +Eshell V5.7.4 (abort with ^G) +1> {ok, Viewer} = et_viewer:start([]). +{ok,<0.40.0>}]]>

A Viewer gets trace Events from its Collector by polling it regularly for more Events to @@ -69,40 +68,38 @@ Collector with et_collector:report_event/6:

Collector = et_viewer:get_collector_pid(Viewer). - <0.39.0> - 3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, start_outer, - 3> "Start outer transaction"), - 3> et_collector:report_event(Collector, 40, mnesia_tm, my_shell, new_tid, - 3> "New transaction id is 4711"), - 3> et_collector:report_event(Collector, 20, my_shell, mnesia_locker, try_write_lock, - 3> "Acquire write lock for {my_tab, key}"), - 3> et_collector:report_event(Collector, 10, mnesia_locker, my_shell, granted, - 3> "You got the write lock for {my_tab, key}"), - 3> et_collector:report_event(Collector, 60, my_shell, do_commit, - 3> "Perform transaction commit"), - 3> et_collector:report_event(Collector, 40, my_shell, mnesia_locker, release_tid, - 3> "Release all locks for transaction 4711"), - 3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, delete_transaction, - 3> "End of outer transaction"), - 3> et_collector:report_event(Collector, 20, my_shell, end_outer, - 3> "Transaction returned {atomic, ok}"). - {ok,{table_handle,<0.39.0>,16402,trace_ts, - #Fun}}]]> +2> Collector = et_viewer:get_collector_pid(Viewer). +<0.39.0> +3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, start_outer, +3> "Start outer transaction"), +3> et_collector:report_event(Collector, 40, mnesia_tm, my_shell, new_tid, +3> "New transaction id is 4711"), +3> et_collector:report_event(Collector, 20, my_shell, mnesia_locker, try_write_lock, +3> "Acquire write lock for {my_tab, key}"), +3> et_collector:report_event(Collector, 10, mnesia_locker, my_shell, granted, +3> "You got the write lock for {my_tab, key}"), +3> et_collector:report_event(Collector, 60, my_shell, do_commit, +3> "Perform transaction commit"), +3> et_collector:report_event(Collector, 40, my_shell, mnesia_locker, release_tid, +3> "Release all locks for transaction 4711"), +3> et_collector:report_event(Collector, 60, my_shell, mnesia_tm, delete_transaction, +3> "End of outer transaction"), +3> et_collector:report_event(Collector, 20, my_shell, end_outer, +3> "Transaction returned {atomic, ok}"). +{ok,{table_handle,<0.39.0>,16402,trace_ts, + #Fun}}]]>

This actually is a simulation of the process Events caused by a Mnesia transaction that writes a record in a local table:

mnesia:write({my_tab, key, val}) end).]]> +mnesia:transaction(fun() -> mnesia:write({my_tab, key, val}) end).]]>

At this stage when we have a couple of Events, it is time to show how it looks like in the graphical interface of et_viewer:

-

- A simulated Mnesia transaction which writes one record @@ -144,11 +141,11 @@

false | true | {true, NewEvent} +filter(TraceData) -> false | true | {true, NewEvent} - TraceData = Event | erlang_trace_data() - Event = #event{} - NewEvent = #event{}]]> +TraceData = Event | erlang_trace_data() +Event = #event{} +NewEvent = #event{}]]>

The interface of the filter function is the same as the the filter functions for the good old lists:filtermap/2. If the filter @@ -204,10 +201,10 @@

Fun = fun(E) -> et_demo:mgr_actors(E) end. - #Fun - 5> et_collector:dict_insert(Collector, {filter, mgr_actors}, Fun). - ok]]> +4> Fun = fun(E) -> et_demo:mgr_actors(E) end. +#Fun +5> et_collector:dict_insert(Collector, {filter, mgr_actors}, Fun). +ok]]>

you will see that the Filter menu in all viewers have got a new entry called mgr_actors. Select it, and a new @@ -228,21 +225,16 @@ Contents Viewer window to pop up, showing the Event in the mgr_actors view:

-

- - The trace Event in the mgr_actors view + The trace Event in the mgr_actors view

Select the all entry in the Filters menu and a new Contents Viewer window will pop up showing the same trace Event in the collectors view:

-

- - The same trace Event in the collectors - view + The same trace Event in the collectors view
@@ -311,7 +303,7 @@ et_collector or et_viewer in order to activate the global tracing. There is no restriction on how many concurrent (anonymous) collectors you can have, but you can only have one - global Collector as its name is registered in + global Collector as its name is registered in global.

In order to further simplify the tracing, you can make use of diff --git a/lib/et/doc/src/et_examples.xmlsrc b/lib/et/doc/src/et_examples.xmlsrc index 6f143a397e..f4d94f7cb0 100644 --- a/lib/et/doc/src/et_examples.xmlsrc +++ b/lib/et/doc/src/et_examples.xmlsrc @@ -55,34 +55,32 @@

mnesia:write({my_tab, key, val}) end).]]> +mnesia:transaction(fun() -> mnesia:write({my_tab, key, val}) end).]]>

And the viewer window will look like:

{ok, Viewer} = et_viewer:start([]). - {ok,<0.40.0>;} - 2> et_demo:sim_trans(). - {ok,{table_handle,<0.45.0>,24596,trace_ts, - #Fun}}]]> +Eshell V5.7.4 (abort with ^G) +1> {ok, Viewer} = et_viewer:start([]). +{ok,<0.40.0>;} +2> et_demo:sim_trans(). +{ok,{table_handle,<0.45.0>,24596,trace_ts, + #Fun}}]]>

- A simulated Mnesia transaction which writes one - record + A simulated Mnesia transaction which writes one record
- Some convenient functions used in the <c>Mnesia</c> transaction + <title>Some convenient functions used in the Mnesia transaction example

The module_as_actor filter converts the Event @@ -173,21 +171,19 @@

et_demo:live_trans(). - {atomic,ok}]]> +Eshell V5.7.4 (abort with ^G) +1> et_demo:live_trans(). +{atomic,ok}]]>

Please, explore the different filters in order to see how the traced transaction can be seen from different point of views:

-

- - A real Mnesia transaction which writes one record + A real Mnesia transaction which writes one record
@@ -215,20 +211,20 @@

- Options = - [{event_order, event_ts}, - {scale, 3}, - {max_actors, infinity}, - {trace_pattern, {megaco, max}}, - {trace_global, true}, - {dict_insert, {filter, megaco_filter}, fun filter/1}, - {active_filter, megaco_filter}, - {title, "Megaco tracer - Erlang/OTP"}], - et_viewer:start(Options).]]> +-module(megaco_filter). +-export([start/0]). + +start() -> + Options = + [{event_order, event_ts}, + {scale, 3}, + {max_actors, infinity}, + {trace_pattern, {megaco, max}}, + {trace_global, true}, + {dict_insert, {filter, megaco_filter}, fun filter/1}, + {active_filter, megaco_filter}, + {title, "Megaco tracer - Erlang/OTP"}], + et_viewer:start(Options).]]>

First we start an Erlang node with a global Collector and its Viewer.

@@ -236,13 +232,12 @@

megaco_filter:start(). - {ok,<0.48.0>}]]> +Eshell V5.7.4 (abort with ^G) +(observer@falco)1> megaco_filter:start(). +{ok,<0.48.0>}]]>

Secondly we start another Erlang node which we connect the observer node, before we start the application that we want to @@ -253,28 +248,27 @@

net:ping(observer@falco). - pong - (mgc@falco)2> megaco:start(). - ok - (mgc@falco)3> megaco_simple_mgc:start(). - {ok,[{ok,2944, - {megaco_receive_handle,{deviceName,"controller"}, - megaco_pretty_text_encoder,[],megaco_tcp,dynamic}}, - {ok,2944, - {megaco_receive_handle,{deviceName,"controller"}, - megaco_pretty_text_encoder,[],megaco_udp,dynamic}}, - {ok,2945, - {megaco_receive_handle,{deviceName,"controller"}, - megaco_binary_encoder,[],megaco_tcp,dynamic}}, - {ok,2945, - {megaco_receive_handle,{deviceName,"controller"}, - megaco_binary_encoder,[],megaco_udp,dynamic}}]}]]> +erl -sname mgc -pa ../../megaco/examples/simple +Erlang R13B03 (erts-5.7.4) [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false] + +Eshell V5.7.4 (abort with ^G) +(mgc@falco)1> net:ping(observer@falco). +pong +(mgc@falco)2> megaco:start(). +ok +(mgc@falco)3> megaco_simple_mgc:start(). +{ok,[{ok,2944, + {megaco_receive_handle,{deviceName,"controller"}, + megaco_pretty_text_encoder,[],megaco_tcp,dynamic}}, + {ok,2944, + {megaco_receive_handle,{deviceName,"controller"}, + megaco_pretty_text_encoder,[],megaco_udp,dynamic}}, + {ok,2945, + {megaco_receive_handle,{deviceName,"controller"}, + megaco_binary_encoder,[],megaco_tcp,dynamic}}, + {ok,2945, + {megaco_receive_handle,{deviceName,"controller"}, + megaco_binary_encoder,[],megaco_udp,dynamic}}]}]]>

And finally we start an Erlang node for the Media Gateways and connect to the observer node. Each Media Gateway connects to the @@ -288,94 +282,87 @@

net:ping(observer@falco). - pong - (mg@falco)2> megaco_simple_mg:start(). - [{{deviceName,"gateway_tt"}, - {error,{start_user,megaco_not_started}}}, - {{deviceName,"gateway_tb"}, - {error,{start_user,megaco_not_started}}}, - {{deviceName,"gateway_ut"}, - {error,{start_user,megaco_not_started}}}, - {{deviceName,"gateway_ub"}, - {error,{start_user,megaco_not_started}}}] - (mg@falco)3> megaco:start(). - ok - (mg@falco)4> megaco_simple_mg:start(). - [{{deviceName,"gateway_tt"}, - {1, - {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, - [{serviceChangeReply, - {'ServiceChangeReply', - [{megaco_term_id,false,["root"]}], - {serviceChangeResParms, - {'ServiceChangeResParm', - {deviceName,"controller"}, - asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE, - asn1_NOVALUE}}}}]}]}}}, - {{deviceName,"gateway_tb"}, - {1, - {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, - [{serviceChangeReply, - {'ServiceChangeReply', - [{megaco_term_id,false,["root"]}], - {serviceChangeResParms, - {'ServiceChangeResParm', - {deviceName,"controller"}, - asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE, - asn1_NOVALUE}}}}]}]}}}, - {{deviceName,"gateway_ut"}, - {1, - {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, - [{serviceChangeReply, - {'ServiceChangeReply', - [{megaco_term_id,false,["root"]}], - {serviceChangeResParms, - {'ServiceChangeResParm', - {deviceName,"controller"}, - asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE, - asn1_NOVALUE}}}}]}]}}}, - {{deviceName,"gateway_ub"}, - {1, - {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, - [{serviceChangeReply, - {'ServiceChangeReply', - [{megaco_term_id,false,["root"]}], - {serviceChangeResParms, - {'ServiceChangeResParm', - {deviceName,"controller"}, - asn1_NOVALUE,asn1_NOVALUE, - asn1_NOVALUE,...}}}}]}]}}}]]]> +Erlang R13B03 (erts-5.7.4) [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false] + +Eshell V5.7.4 (abort with ^G) +(mg@falco)1> net:ping(observer@falco). +pong +(mg@falco)2> megaco_simple_mg:start(). +[{{deviceName,"gateway_tt"}, + {error,{start_user,megaco_not_started}}}, + {{deviceName,"gateway_tb"}, + {error,{start_user,megaco_not_started}}}, + {{deviceName,"gateway_ut"}, + {error,{start_user,megaco_not_started}}}, + {{deviceName,"gateway_ub"}, + {error,{start_user,megaco_not_started}}}] +(mg@falco)3> megaco:start(). +ok +(mg@falco)4> megaco_simple_mg:start(). +[{{deviceName,"gateway_tt"}, + {1, + {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, + [{serviceChangeReply, + {'ServiceChangeReply', + [{megaco_term_id,false,["root"]}], + {serviceChangeResParms, + {'ServiceChangeResParm', + {deviceName,"controller"}, + asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE, + asn1_NOVALUE}}}}]}]}}}, + {{deviceName,"gateway_tb"}, + {1, + {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, + [{serviceChangeReply, + {'ServiceChangeReply', + [{megaco_term_id,false,["root"]}], + {serviceChangeResParms, + {'ServiceChangeResParm', + {deviceName,"controller"}, + asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE, + asn1_NOVALUE}}}}]}]}}}, + {{deviceName,"gateway_ut"}, + {1, + {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, + [{serviceChangeReply, + {'ServiceChangeReply', + [{megaco_term_id,false,["root"]}], + {serviceChangeResParms, + {'ServiceChangeResParm', + {deviceName,"controller"}, + asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE, + asn1_NOVALUE}}}}]}]}}}, + {{deviceName,"gateway_ub"}, + {1, + {ok,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE, + [{serviceChangeReply, + {'ServiceChangeReply', + [{megaco_term_id,false,["root"]}], + {serviceChangeResParms, + {'ServiceChangeResParm', + {deviceName,"controller"}, + asn1_NOVALUE,asn1_NOVALUE, + asn1_NOVALUE,...}}}}]}]}}}]]]>

The Megaco adopted viewer looks like this, when we have clicked - on the [gateway_tt] actor name in order to only display the events + on the [gateway_tt] actor name in order to only display the events regarding that actor:

-

- The viewer adopted for Megaco

A pretty printed Megaco message looks like this:

-

- - A textual Megaco message + A textual Megaco message

And the corresponding internal form for the same Megaco message looks like this:

-

- - The internal form of a Megaco message + The internal form of a Megaco message
diff --git a/lib/et/doc/src/et_tutorial.xmlsrc b/lib/et/doc/src/et_tutorial.xmlsrc index b5d1b815be..b6e1ca141c 100644 --- a/lib/et/doc/src/et_tutorial.xmlsrc +++ b/lib/et/doc/src/et_tutorial.xmlsrc @@ -75,12 +75,10 @@

When you run the et_display_demo:test(). function in the - example above, the Viewer window will look like this:

. - -

+ example above, the Viewer window will look like this:

- Screenshot of the Viewer window + Screenshot of the Viewer window
@@ -262,14 +260,11 @@

When you run the et_trace_demo:test() function above, the - Viewer window will look like this screenshot:

. + Viewer window will look like this screenshot:

-

- - Screenshot of the Viewer window + Screenshot of the Viewer window
- -- cgit v1.2.3 From b9fde31513f41aa51c3ebe2b7ab7696b4714f501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 26 May 2016 15:56:13 +0200 Subject: et: Fix unmatched return warnings --- lib/et/src/et_collector.erl | 29 ++++---- lib/et/src/et_wx_contents_viewer.erl | 109 ++++++++++++++-------------- lib/et/src/et_wx_viewer.erl | 136 ++++++++++++++++------------------- 3 files changed, 133 insertions(+), 141 deletions(-) (limited to 'lib/et') diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl index b8916c0eb9..aba90b0be1 100644 --- a/lib/et/src/et_collector.erl +++ b/lib/et/src/et_collector.erl @@ -27,8 +27,7 @@ -behaviour(gen_server). %% External exports --export([ - start_link/1, +-export([start_link/1, stop/1, report/2, @@ -55,8 +54,7 @@ dict_delete/2, dict_lookup/2, dict_match/2, - multicast/2 - ]). + multicast/2]). %% Internal export -export([monitor_trace_port/2]). @@ -258,7 +256,7 @@ parse_opt(BadList, _S, _Dict, _Clients) -> {error, {bad_option_list, BadList}}. start_clients(CollectorPid, [{Type, Parameters} | T]) -> - start_trace_client(CollectorPid, Type, Parameters), + _ = start_trace_client(CollectorPid, Type, Parameters), start_clients(CollectorPid, T); start_clients(CollectorPid, []) -> {ok, CollectorPid}. @@ -892,7 +890,7 @@ init([InitialS, Dict]) -> process_flag(trap_exit, true), case InitialS#state.parent_pid of undefined -> - ignore; + ok; Pid when is_pid(Pid) -> link(Pid) end, @@ -914,7 +912,7 @@ init_global(S) -> Spec = trace_spec_wrapper(EventFun, EndFun, {ok, self()}), dbg:tracer(process, Spec), et_selector:change_pattern(S#state.trace_pattern), - net_kernel:monitor_nodes(true), + ok = net_kernel:monitor_nodes(true), lists:foreach(fun(N) -> self() ! {nodeup, N} end, nodes()), S#state{trace_nodes = [node()]}; false -> @@ -1001,7 +999,7 @@ handle_call({save_event_file, FileName, Options}, _From, S) -> %% insert() -> %% case S2#state.file of %% undefined -> - %% ignore; + %% ok; %% F -> %% Fd = F#file.desc, %% ok = disk_log:log(Fd, Event) @@ -1010,7 +1008,7 @@ handle_call({save_event_file, FileName, Options}, _From, S) -> Fun = fun({_, E}, A) -> ok = disk_log:log(Fd, E), A end, Tab = S#state.event_tab, Reply = tab_iterate(Fun, Tab, ets:first(Tab), ok), - disk_log:close(Fd), + ok = disk_log:close(Fd), {Reply, S} %% all -> %% Reply = tab_iterate(WriteFun, Tab, ok), @@ -1033,7 +1031,7 @@ handle_call({save_event_file, FileName, Options}, _From, S) -> handle_call({change_pattern, Pattern}, _From, S) -> Ns = S#state.trace_nodes, - rpc:multicall(Ns, et_selector, change_pattern, [Pattern]), + {_,[]} = rpc:multicall(Ns, et_selector, change_pattern, [Pattern]), Reply = {old_pattern, S#state.trace_pattern}, S2 = S#state{trace_pattern = Pattern}, reply(Reply, S2); @@ -1045,8 +1043,9 @@ handle_call(clear_table, _From, S) -> handle_call(stop, _From, S) -> do_multicast(S#state.subscribers, close), case S#state.trace_global of - true -> rpc:multicall(S#state.trace_nodes, dbg, stop_clear, []); - false -> ignore + true -> {_,[]} = rpc:multicall(S#state.trace_nodes, dbg, stop_clear, []), + ok; + false -> ok end, {stop, shutdown, ok, S}; handle_call(Request, From, S) -> @@ -1239,8 +1238,8 @@ tab_iterate(Fun, Tab, Key, Acc) -> file_open(F) -> Fd = make_ref(), case F#file.file_opt of - write -> file:rename(F#file.name, F#file.name ++ ".OLD"); - append -> ignore + write -> ok = file:rename(F#file.name, F#file.name ++ ".OLD"); + append -> ok end, Args = [{file, F#file.name}, {name, Fd}, {repair, true}, {mode, read_write}], @@ -1278,7 +1277,7 @@ do_multicast([], _Msg) -> opt_unlink(Pid) -> if Pid =:= undefined -> - ignore; + ok; true -> unlink(Pid) end. diff --git a/lib/et/src/et_wx_contents_viewer.erl b/lib/et/src/et_wx_contents_viewer.erl index d5347a43db..247dd4c7ba 100644 --- a/lib/et/src/et_wx_contents_viewer.erl +++ b/lib/et/src/et_wx_contents_viewer.erl @@ -89,7 +89,7 @@ start_link(Options) -> S#state.parent_pid =/= self() -> unlink(Pid); true -> - ignore + ok end, {ok, Pid} catch @@ -242,11 +242,12 @@ handle_event(#wx{id = Id, S) -> case proplists:get_value(Id, S#state.menu_data) of undefined -> - ignore; + ok; Data when is_record(Data, filter) -> F = Data, - ChildState= S#state{active_filter = F#filter.name}, - wx_object:start_link(?MODULE, [ChildState], []); + ChildState = S#state{active_filter = F#filter.name}, + _ = wx_object:start_link(?MODULE, [ChildState], []), + ok; {hide, Actors} -> send_viewer_event(S, {delete_actors, Actors}); {show, Actors} -> @@ -267,7 +268,7 @@ handle_event(#wx{id = Id, TimeStamp = case S#state.event_order of trace_ts -> Event#event.trace_ts; - event_ts -> Event#event.event_ts + event_ts -> Event#event.event_ts end, FileName = lists:flatten(["et_contents_viewer_", now_to_string(TimeStamp), ".txt"]), Style = ?wxFD_SAVE bor ?wxFD_OVERWRITE_PROMPT, @@ -275,7 +276,7 @@ handle_event(#wx{id = Id, case select_file(S#state.frame, Msg, filename:absname(FileName), Style) of {ok, FileName2} -> Bin = list_to_binary(event_to_string(Event, S#state.event_order)), - file:write_file(FileName2, Bin); + ok = file:write_file(FileName2, Bin); cancel -> ok end, @@ -351,19 +352,21 @@ handle_event(#wx{event = #wxKey{rawCode = KeyCode}}, S) -> $0 -> case lists:keysearch(?DEFAULT_FILTER_NAME, #filter.name, S#state.filters) of {value, F} when is_record(F, filter) -> - ChildState= S#state{active_filter = F#filter.name}, - wx_object:start_link(?MODULE, [ChildState], []); + ChildState = S#state{active_filter = F#filter.name}, + _ = wx_object:start_link(?MODULE, [ChildState], []), + ok; false -> - ignore + ok end, {noreply, S}; Int when is_integer(Int), Int > $0, Int =< $9 -> case catch lists:nth(Int-$0, S#state.filters) of F when is_record(F, filter) -> - ChildState= S#state{active_filter = F#filter.name}, - wx_object:start_link(?MODULE, [ChildState], []); + ChildState = S#state{active_filter = F#filter.name}, + _ = wx_object:start_link(?MODULE, [ChildState], []), + ok; {'EXIT', _} -> - ignore + ok end, {noreply, S}; @@ -443,11 +446,11 @@ create_window(S) -> Title = lists:concat([?MODULE, " (filter: ", Name, ")"]), WinOpt = [{size, {W,H}}], Frame = wxFrame:new(wx:null(), ?wxID_ANY, Title, WinOpt), - wxFrame:createStatusBar(Frame), + _ = wxFrame:createStatusBar(Frame), Panel = wxPanel:new(Frame, []), Bar = wxMenuBar:new(), - wxFrame:setMenuBar(Frame,Bar), + _ = wxFrame:setMenuBar(Frame,Bar), create_file_menu(Bar), Editor = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, 0 bor ?wxDEFAULT @@ -457,21 +460,21 @@ create_window(S) -> bor ?wxTE_DONTWRAP}]), Font = wxFont:new(10, ?wxFONTFAMILY_TELETYPE, ?wxNORMAL, ?wxNORMAL,[]), TextAttr = wxTextAttr:new(?wxBLACK, [{font, Font}]), - wxTextCtrl:setDefaultStyle(Editor, TextAttr), + _ = wxTextCtrl:setDefaultStyle(Editor, TextAttr), Sizer = wxBoxSizer:new(?wxHORIZONTAL), - wxSizer:add(Sizer, Editor, [{flag, ?wxEXPAND}, {proportion, 1}]), + _ = wxSizer:add(Sizer, Editor, [{flag, ?wxEXPAND}, {proportion, 1}]), FilteredEvent = config_editor(Editor, S), S2 = S#state{win = Frame, panel = Panel, filtered_event = FilteredEvent}, HideData = create_hide_menu(Bar, S2), SearchData = create_search_menu(Bar, S2), FilterData = create_filter_menu(Bar, S#state.filters), - wxFrame:connect(Frame, command_menu_selected, []), - wxFrame:connect(Frame, key_up), - wxFrame:connect(Frame, close_window, [{skip,true}]), - wxFrame:setFocus(Frame), - wxPanel:setSizer(Panel, Sizer), - wxSizer:fit(Sizer, Panel), - wxFrame:show(Frame), + _ = wxFrame:connect(Frame, command_menu_selected, []), + _ = wxFrame:connect(Frame, key_up), + _ = wxFrame:connect(Frame, close_window, [{skip,true}]), + _ = wxFrame:setFocus(Frame), + _ = wxPanel:setSizer(Panel, Sizer), + _ = wxSizer:fit(Sizer, Panel), + _ = wxFrame:show(Frame), S2#state{menu_data = HideData++SearchData++FilterData, editor = Editor, frame = Frame}. menuitem(Menu, Id, Text, UserData) -> @@ -480,16 +483,17 @@ menuitem(Menu, Id, Text, UserData) -> create_file_menu(Bar) -> Menu = wxMenu:new([]), - wxMenu:append(Menu, ?wxID_SAVE, "Save"), - wxMenu:append(Menu, ?wxID_PRINT,"Print"), - wxMenu:appendSeparator(Menu), - wxMenu:append(Menu, ?wxID_EXIT, "Close"), - wxMenuBar:append(Bar, Menu, "File"). + _ = wxMenu:append(Menu, ?wxID_SAVE, "Save"), + _ = wxMenu:append(Menu, ?wxID_PRINT,"Print"), + _ = wxMenu:appendSeparator(Menu), + _ = wxMenu:append(Menu, ?wxID_EXIT, "Close"), + _ = wxMenuBar:append(Bar, Menu, "File"), + ok. create_filter_menu(Bar, Filters) -> Menu = wxMenu:new([]), - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Select Filter"), [{enable, false}]), - wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Select Filter"), [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), Item = fun(F, {N,Acc}) when F#filter.name =:= ?DEFAULT_FILTER_NAME-> Label = lists:concat([pad_string(F#filter.name, 20, $\ , right), "(0)"]), MenuItem = menuitem(Menu, ?wxID_ANY, Label, F), @@ -502,7 +506,7 @@ create_filter_menu(Bar, Filters) -> end, Filters2 = lists:keysort(#filter.name, Filters), {_,MenuData} = lists:foldl(Item, {1, []}, Filters2), - wxMenuBar:append(Bar, Menu, "Filters"), + _ = wxMenuBar:append(Bar, Menu, "Filters"), MenuData. create_hide_menu(Bar, S) -> @@ -515,33 +519,33 @@ create_hide_menu(Bar, S) -> S#state.viewer_pid =:= undefined -> ignore; From =:= To -> - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "), - [{enable, false}]), - wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), Hide = menuitem(Menu, ?wxID_ANY, "From=To (f|t|b)", {hide, [From]}), - wxMenu:appendSeparator(Menu), - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "), - [{enable, false}]), - wxMenu:appendSeparator(Menu), + _ = wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), Show = menuitem(Menu, ?wxID_ANY, "From=To (F|T|B)", {show, [From]}), [Show,Hide]; true -> - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "), - [{enable, false}]), - wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Hide actor in Viewer "), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), Hide = [menuitem(Menu, ?wxID_ANY, "From (f)", {hide, [From]}), menuitem(Menu, ?wxID_ANY, "To (t)", {hide, [To]}), menuitem(Menu, ?wxID_ANY, "Both (b)", {hide, [From, To]})], - wxMenu:appendSeparator(Menu), - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "), - [{enable, false}]), - wxMenu:appendSeparator(Menu), + _ = wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Show actor in Viewer "), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), Show = [menuitem(Menu, ?wxID_ANY, "From (F)", {show, [From]}), menuitem(Menu, ?wxID_ANY, "To (T)", {show, [To]}), menuitem(Menu, ?wxID_ANY, "Both (B)", {show, [From, To]})], Show++Hide end, - wxMenuBar:append(Bar, Menu, "Hide"), + _ = wxMenuBar:append(Bar, Menu, "Hide"), MenuData. create_search_menu(Bar, S) -> @@ -549,9 +553,9 @@ create_search_menu(Bar, S) -> E = S#state.filtered_event, From = E#event.from, To = E#event.to, - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Search in Viewer "), - [{enable, false}]), - wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Search in Viewer "), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), MenuData = if S#state.viewer_pid =:= undefined -> @@ -571,7 +575,7 @@ create_search_menu(Bar, S) -> menuitem(Menu, ?wxID_ANY, "Reverse from this event (r)", {mode, ModeR}), menuitem(Menu, ?wxID_ANY, "Abort search. Display all (a)", {mode, all})] end, - wxMenuBar:append(Bar, Menu, "Search"), + _ = wxMenuBar:append(Bar, Menu, "Search"), MenuData. config_editor(Editor, S) -> @@ -668,9 +672,10 @@ pad_string(String, MinLen, Char, Dir) when is_integer(MinLen), MinLen >= 0 -> send_viewer_event(S, Event) -> case S#state.viewer_pid of ViewerPid when is_pid(ViewerPid) -> - ViewerPid ! {et, Event}; + ViewerPid ! {et, Event}, + ok; undefined -> - ignore + ok end. select_file(Frame, Message, DefaultFile, Style) -> diff --git a/lib/et/src/et_wx_viewer.erl b/lib/et/src/et_wx_viewer.erl index 0fc10cb37b..9613299e6b 100644 --- a/lib/et/src/et_wx_viewer.erl +++ b/lib/et/src/et_wx_viewer.erl @@ -320,8 +320,8 @@ init([S]) when is_record(S, state) -> undefined -> ok; ParentPid -> link(ParentPid) end, - wx:new(), - wx:debug(S#state.wx_debug), + _ = wx:new(), + _ = wx:debug(S#state.wx_debug), et_collector:dict_insert(S#state.collector_pid, {subscriber, self()}, ?MODULE), @@ -532,26 +532,25 @@ handle_info(#wx{id=Id, event = #wxCommand{type = command_menu_selected}}, S=#sta load_all -> Style = ?wxFD_OPEN bor ?wxFD_OVERWRITE_PROMPT, Msg = "Select a file to load events from", - S2 = - case select_file(S#state.frame, Msg, S#state.event_file, Style) of - {ok, NewFile} -> - et_collector:start_trace_client(CollectorPid, event_file, NewFile), - S#state{event_file = NewFile}; - cancel -> - S - end, + S2 = case select_file(S#state.frame, Msg, S#state.event_file, Style) of + {ok, NewFile} -> + _ = et_collector:start_trace_client(CollectorPid, event_file, NewFile), + S#state{event_file = NewFile}; + cancel -> + S + end, noreply(S2); save_all -> Style = ?wxFD_SAVE bor ?wxFD_OVERWRITE_PROMPT, Msg = "Select a file to save events to", - S2 = - case select_file(S#state.frame, Msg, S#state.event_file, Style) of - {ok, NewFile} -> - et_collector:save_event_file(CollectorPid, NewFile, [existing, write, keep]), - S#state{event_file = NewFile}; - cancel -> - S - end, + S2 = case select_file(S#state.frame, Msg, S#state.event_file, Style) of + {ok, NewFile} -> + ok = et_collector:save_event_file(CollectorPid, NewFile, + [existing, write, keep]), + S#state{event_file = NewFile}; + cancel -> + S + end, noreply(S2); print_setup -> S2 = print_setup(S), @@ -787,7 +786,7 @@ handle_info(#wx{event = #wxKey{keyCode = KeyCode, shiftDown = SD}}, S) -> noreply(S) end; handle_info(#wx{event = #wxScroll{type = scroll_changed}} = Wx, S) -> - get_latest_scroll(Wx), + _ = get_latest_scroll(Wx), Pos = wxScrollBar:getThumbPosition(S#state.scroll_bar), {_, LineTopY, LineBotY} = calc_y(S), Range = LineBotY - LineTopY, @@ -1107,7 +1106,7 @@ pick_n([Head | Tail], N, Acc) when N > 0 -> pick_n(Tail, N - 1, [Head | Acc]). close_all(S) -> - close_all_others(S), + _ = close_all_others(S), wxFrame:destroy(S#state.frame), opt_unlink(S#state.parent_pid), {stop, shutdown, S}. @@ -1115,12 +1114,12 @@ close_all(S) -> close_all_others(S) -> Fun = fun({{subscriber, Pid}, _}) -> - if - Pid =:= self() -> - ignore; + if Pid =:= self() -> + ok; true -> unlink(Pid), - Pid ! {et, close} + Pid ! {et, close}, + ok end end, All = et_collector:dict_match(S#state.collector_pid, @@ -1208,9 +1207,9 @@ create_main_window(S) -> CheckBoxData = [{wxCheckBox:getId(HideActions), hide_actions}, {wxCheckBox:getId(HideActors), hide_actors}], wxPanel:connect(Panel, command_checkbox_clicked), - wxSizer:add(CheckSizer, HideActions), - wxSizer:add(CheckSizer,HideActors), - wxSizer:add(OptSizer, CheckSizer, [{border, 10}, {flag, ?wxALL}]), + _ = wxSizer:add(CheckSizer, HideActions), + _ = wxSizer:add(CheckSizer,HideActors), + _ = wxSizer:add(OptSizer, CheckSizer, [{border, 10}, {flag, ?wxALL}]), DetailLevelBox = wxStaticBoxSizer:new(?wxHORIZONTAL, Panel, [{label, "Detail level"}]), @@ -1222,22 +1221,21 @@ create_main_window(S) -> {size, {200,-1}}]), wxStatusBar:setStatusText(StatusBar, where_text(S)), wxFrame:connect(Frame, command_slider_updated), - wxSizer:add(DetailLevelBox, DetailLevel), - wxSizer:add(OptSizer, DetailLevelBox, [{border, 10}, {flag, ?wxALL}]), - wxSizer:addStretchSpacer(OptSizer), - wxSizer:add(MainSizer, OptSizer), - wxSizer:add(MainSizer, - wxStaticLine:new(Panel, [{style, ?wxLI_HORIZONTAL}]), - [{flag, ?wxEXPAND}]), + _ = wxSizer:add(DetailLevelBox, DetailLevel), + _ = wxSizer:add(OptSizer, DetailLevelBox, [{border, 10}, {flag, ?wxALL}]), + _ = wxSizer:addStretchSpacer(OptSizer), + _ = wxSizer:add(MainSizer, OptSizer), + _ = wxSizer:add(MainSizer, wxStaticLine:new(Panel, [{style, ?wxLI_HORIZONTAL}]), + [{flag, ?wxEXPAND}]), CanvasSizer = wxBoxSizer:new(?wxHORIZONTAL), Canvas = wxPanel:new(Panel, [{style, ?wxFULL_REPAINT_ON_RESIZE}]), {CanvasW,CanvasH} = wxPanel:getSize(Canvas), ScrollBar = wxScrollBar:new(Panel, ?wxID_ANY, [{style, ?wxSB_VERTICAL}]), - wxSizer:add(CanvasSizer, Canvas, [{flag, ?wxEXPAND}, {proportion, 1}]), - wxSizer:add(CanvasSizer, ScrollBar, [{flag, ?wxEXPAND}]), - wxSizer:add(MainSizer, CanvasSizer, [{flag, ?wxEXPAND}, {proportion, 1}]), + _ = wxSizer:add(CanvasSizer, Canvas, [{flag, ?wxEXPAND}, {proportion, 1}]), + _ = wxSizer:add(CanvasSizer, ScrollBar, [{flag, ?wxEXPAND}]), + _ = wxSizer:add(MainSizer, CanvasSizer, [{flag, ?wxEXPAND}, {proportion, 1}]), wxPanel:connect(Canvas, left_down), wxPanel:connect(Canvas, left_up), wxPanel:connect(Canvas, right_up), @@ -1337,8 +1335,7 @@ menuitem(Menu, Id, Text, UserData) -> create_file_menu(Bar) -> Menu = wxMenu:new([]), - Data = [ - menuitem(Menu, ?wxID_ANY, "Clear all events in the Collector", clear_all), + Data = [menuitem(Menu, ?wxID_ANY, "Clear all events in the Collector", clear_all), menuitem(Menu, ?wxID_ANY, "Load events to the Collector from file", load_all), menuitem(Menu, ?wxID_ANY, "Save all events in the Collector to file", save_all), @@ -1348,51 +1345,44 @@ create_file_menu(Bar) -> menuitem(Menu, ?wxID_ANY, "Close this Viewer", close), menuitem(Menu, ?wxID_ANY, "Close all other Viewers, but this (c)", close_all_others), - menuitem(Menu, ?wxID_ANY, "Close all Viewers and the Collector) (C) ", close_all) - ], - wxMenu:insertSeparator(Menu, 3), - wxMenu:insertSeparator(Menu, 7), + menuitem(Menu, ?wxID_ANY, "Close all Viewers and the Collector) (C) ", close_all)], + _ = wxMenu:insertSeparator(Menu, 3), + _ = wxMenu:insertSeparator(Menu, 7), wxMenuBar:append(Bar, Menu, "File"), Data. create_viewer_menu(Bar) -> Menu = wxMenu:new([]), - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll this Viewer"), - [{enable, false}]), - wxMenu:appendSeparator(Menu), - D1 = [ - menuitem(Menu, ?wxID_ANY, "First (f)", first), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll this Viewer"), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), + D1 = [menuitem(Menu, ?wxID_ANY, "First (f)", first), menuitem(Menu, ?wxID_ANY, "Last (l)", last), menuitem(Menu, ?wxID_ANY, "Prev (p)", prev), menuitem(Menu, ?wxID_ANY, "Next (n)", next), - menuitem(Menu, ?wxID_ANY, "Refresh (r)", refresh) - ], - wxMenu:appendSeparator(Menu), - D2 = [ - menuitem(Menu, ?wxID_ANY, "Up 5 (Up)", up), - menuitem(Menu, ?wxID_ANY, "Down 5 (Down)", down) - ], - wxMenu:appendSeparator(Menu), - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Actor visibility in this Viewer"), - [{enable, false}]), - wxMenu:appendSeparator(Menu), + menuitem(Menu, ?wxID_ANY, "Refresh (r)", refresh)], + _ = wxMenu:appendSeparator(Menu), + D2 = [menuitem(Menu, ?wxID_ANY, "Up 5 (Up)", up), + menuitem(Menu, ?wxID_ANY, "Down 5 (Down)", down)], + _ = wxMenu:appendSeparator(Menu), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Actor visibility in this Viewer"), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), D3 = [menuitem(Menu, ?wxID_ANY, "Display all actors (a)", display_all)], - wxMenuBar:append(Bar, Menu, "Viewer"), + _ = wxMenuBar:append(Bar, Menu, "Viewer"), [D1,D2,D3]. create_collector_menu(Bar) -> Menu = wxMenu:new([]), - wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll all Viewers"), - [{enable, false}]), - wxMenu:appendSeparator(Menu), - Data = [ - menuitem(Menu, ?wxID_ANY, "First (F)", first_all), + _ = wxMenuItem:enable(wxMenu:append(Menu, ?wxID_ANY, "Scroll all Viewers"), + [{enable, false}]), + _ = wxMenu:appendSeparator(Menu), + Data = [menuitem(Menu, ?wxID_ANY, "First (F)", first_all), menuitem(Menu, ?wxID_ANY, "Last (L)", last_all), menuitem(Menu, ?wxID_ANY, "Prev (P)", prev_all), menuitem(Menu, ?wxID_ANY, "Next (N)", next_all), - menuitem(Menu, ?wxID_ANY, "Refresh (R)", refresh_all) - ], - wxMenuBar:append(Bar, Menu, "Collector"), + menuitem(Menu, ?wxID_ANY, "Refresh (R)", refresh_all)], + _ = wxMenuBar:append(Bar, Menu, "Collector"), Data. create_filter_menu(S=#state{filter_menu = {Menu,Data}}, ActiveFilterName, Filters) -> @@ -1421,21 +1411,19 @@ create_filter_menu(S=#state{filter_menu = {Menu,Data}}, ActiveFilterName, Filter Same = lists:concat([pad_string(ActiveFilterName, 20), "(=) same scale"]), Larger = lists:concat([pad_string(ActiveFilterName, 20), "(+) bigger scale"]), Smaller = lists:concat([pad_string(ActiveFilterName, 20), "(-) smaller scale"]), - D2 = [ - menuitem(Menu, ?wxID_ANY, Same, {data, Filter, 0}), + D2 = [menuitem(Menu, ?wxID_ANY, Same, {data, Filter, 0}), menuitem(Menu, ?wxID_ANY, Smaller, {data, Filter, -1}), menuitem(Menu, ?wxID_ANY, Larger, {data, Filter, 1}), wxMenu:appendSeparator(Menu), I2 = wxMenu:append(Menu, ?wxID_ANY, "New Filter Same Scale"), - wxMenu:appendSeparator(Menu) - ], - wxMenuItem:enable(I2, [{enable,false}]), + wxMenu:appendSeparator(Menu)], + _ = wxMenuItem:enable(I2, [{enable,false}]), {_,D3} = lists:foldl(Item, {1,[]}, Filters), S#state{filter_menu = {Menu, lists:flatten([D1,D2,D3])}}. create_help_menu(Bar) -> Menu = wxMenu:new([]), - menuitem(Menu, ?wxID_HELP, "Info", help), + _ = menuitem(Menu, ?wxID_HELP, "Info", help), wxMenuBar:append(Bar, Menu, "Help"). clear_canvas(S) -> -- cgit v1.2.3 From e020f75c10410a6943cd055bfa072a2641eab7da Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 2 Jun 2016 10:55:26 +0200 Subject: Prepare release --- lib/et/doc/src/notes.xml | 16 ++++++++++++++++ lib/et/vsn.mk | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index ee9e34d14d..5300d2e4ef 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -37,6 +37,22 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

+
ET 1.6 + +
Improvements and New Features + + +

+ Update selector to utilize new garbage collection trace + tags.

+

+ Own Id: OTP-13545

+
+
+
+ +
+
ET 1.5.1
Fixed Bugs and Malfunctions diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index 0af7bf75e1..a37fec083b 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.5.1 +ET_VSN = 1.6 -- cgit v1.2.3 From c04cad3ba921deb086d19e2de2526af4854add75 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 2 Jun 2016 11:39:07 +0200 Subject: Revert "Prepare release" This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da. --- lib/et/doc/src/notes.xml | 16 ---------------- lib/et/vsn.mk | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index 5300d2e4ef..ee9e34d14d 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -37,22 +37,6 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

-
ET 1.6 - -
Improvements and New Features - - -

- Update selector to utilize new garbage collection trace - tags.

-

- Own Id: OTP-13545

-
-
-
- -
-
ET 1.5.1
Fixed Bugs and Malfunctions diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index a37fec083b..0af7bf75e1 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.6 +ET_VSN = 1.5.1 -- cgit v1.2.3 From 6e51c6d19612d03abc81b86bb70b8d7da678ce5d Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 21 Jun 2016 15:12:41 +0200 Subject: Prepare release --- lib/et/doc/src/notes.xml | 16 ++++++++++++++++ lib/et/vsn.mk | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/et') diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml index ee9e34d14d..5300d2e4ef 100644 --- a/lib/et/doc/src/notes.xml +++ b/lib/et/doc/src/notes.xml @@ -37,6 +37,22 @@ one section in this document. The title of each section is the version number of Event Tracer (ET).

+
ET 1.6 + +
Improvements and New Features + + +

+ Update selector to utilize new garbage collection trace + tags.

+

+ Own Id: OTP-13545

+
+
+
+ +
+
ET 1.5.1
Fixed Bugs and Malfunctions diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk index 0af7bf75e1..a37fec083b 100644 --- a/lib/et/vsn.mk +++ b/lib/et/vsn.mk @@ -1 +1 @@ -ET_VSN = 1.5.1 +ET_VSN = 1.6 -- cgit v1.2.3