From 105c2f9d8e2846857b4aa37ebec70439e429c497 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 22 Feb 2018 17:28:51 +0100 Subject: erts,observer: Add port states and flags to crash dump --- lib/observer/src/cdv_port_cb.erl | 2 ++ lib/observer/src/crashdump_viewer.erl | 4 ++++ lib/observer/src/crashdump_viewer.hrl | 2 ++ 3 files changed, 8 insertions(+) (limited to 'lib/observer/src') diff --git a/lib/observer/src/cdv_port_cb.erl b/lib/observer/src/cdv_port_cb.erl index c0a6d87bce..3c1c99e140 100644 --- a/lib/observer/src/cdv_port_cb.erl +++ b/lib/observer/src/cdv_port_cb.erl @@ -99,6 +99,8 @@ format(D) -> info_fields() -> [{"Overview", [{"Name", name}, + {"State", state}, + {"Task Flags", task_flags}, {"Connected", {click,connected}}, {"Slot", slot}, {"Controls", controls}, diff --git a/lib/observer/src/crashdump_viewer.erl b/lib/observer/src/crashdump_viewer.erl index 6b85dc6bc2..07c2e1cd47 100644 --- a/lib/observer/src/crashdump_viewer.erl +++ b/lib/observer/src/crashdump_viewer.erl @@ -1648,6 +1648,10 @@ port_to_tuple("#Port<"++Port) -> get_portinfo(Fd,Port) -> case line_head(Fd) of + "State" -> + get_portinfo(Fd,Port#port{state=bytes(Fd)}); + "Task Flags" -> + get_portinfo(Fd,Port#port{task_flags=bytes(Fd)}); "Slot" -> %% stored as integer so we can sort on it get_portinfo(Fd,Port#port{slot=list_to_integer(bytes(Fd))}); diff --git a/lib/observer/src/crashdump_viewer.hrl b/lib/observer/src/crashdump_viewer.hrl index 7f24fcca9a..a14fbf7f69 100644 --- a/lib/observer/src/crashdump_viewer.hrl +++ b/lib/observer/src/crashdump_viewer.hrl @@ -99,6 +99,8 @@ -record(port, {id, + state, + task_flags=0, slot, connected, links, -- cgit v1.2.3