summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2017-10-12 18:59:05 +0300
committerMichael Klishin <mklishin@pivotal.io>2017-10-12 18:59:05 +0300
commit78e88ed8b1d477ddb3eeec5f33a8f398af4cb5ab (patch)
tree5c1b46b99e0d3aca911c23184ff3f5b2180c76ef
parent4a1c169d3148669b6290e27dbd6bc4829a912395 (diff)
parente32c7d3f281456bad0ee1a47214007668175f6fa (diff)
downloadrabbitmq-server-git-78e88ed8b1d477ddb3eeec5f33a8f398af4cb5ab.tar.gz
Merge branch 'master' into rabbitmq-common-224-master-lrb
-rw-r--r--docs/rabbitmq.config.example10
-rw-r--r--src/rabbit_looking_glass.erl20
2 files changed, 20 insertions, 10 deletions
diff --git a/docs/rabbitmq.config.example b/docs/rabbitmq.config.example
index 60af5b7eea..0882764a3a 100644
--- a/docs/rabbitmq.config.example
+++ b/docs/rabbitmq.config.example
@@ -258,11 +258,11 @@
%%
%% {vm_memory_high_watermark_paging_ratio, 0.5},
- %% Selects Erlang VM memory consumption calculation strategy. Can be `rss` or `erlang`,
- %% `rss` is the default. Introduced in 3.6.11.
- %% See https://github.com/rabbitmq/rabbitmq-server/issues/1223 for background.
- %% {vm_memory_calculation_strategy, rss},
-
+ %% Selects Erlang VM memory consumption calculation strategy. Can be `allocated`, `rss` or `legacy` (aliased as `erlang`),
+ %% Introduced in 3.6.11. `allocated` is the default as of 3.6.13.
+ %% See https://github.com/rabbitmq/rabbitmq-server/issues/1223 and rabbitmq/rabbitmq-common#224 for background.
+ %% {vm_memory_calculation_strategy, allocated},
+
%% Interval (in milliseconds) at which we perform the check of the memory
%% levels against the watermarks.
%%
diff --git a/src/rabbit_looking_glass.erl b/src/rabbit_looking_glass.erl
index 702fb41eb8..6cd53dbc23 100644
--- a/src/rabbit_looking_glass.erl
+++ b/src/rabbit_looking_glass.erl
@@ -17,6 +17,7 @@
-module(rabbit_looking_glass).
-ignore_xref([{lg, trace, 4}]).
+-ignore_xref([{maps, from_list, 1}]).
-export([boot/0]).
-export([connections/0]).
@@ -27,12 +28,21 @@ boot() ->
ok;
Value ->
Input = parse_value(Value),
- rabbit_log:info("Enabling Looking Glass profiler, input value: ~p", [Input]),
+ rabbit_log:info(
+ "Enabling Looking Glass profiler, input value: ~p",
+ [Input]
+ ),
{ok, _} = application:ensure_all_started(looking_glass),
- lg:trace(Input, lg_file_tracer, "traces.lz4", #{
- mode => profile,
- running => true,
- send => true})
+ lg:trace(
+ Input,
+ lg_file_tracer,
+ "traces.lz4",
+ maps:from_list([
+ {mode, profile},
+ {running, true},
+ {send, true}]
+ )
+ )
end.
parse_value(Value) ->