File 0146-etp-commands-various-small-fixes.patch of Package erlang

From 8e8cad0de262137004e3af09c92ff8d57d4f2426 Mon Sep 17 00:00:00 2001
From: Maxim Fedorov <maximfca@gmail.com>
Date: Tue, 25 May 2021 08:27:57 -0700
Subject: [PATCH] etp-commands: various small fixes

Fixed etp-cons and etpf-cons printing.
Added dirty CPU/IO schedulers and poll thread to etp-thr.py.
Fixed outdated comments
---
 erts/etc/unix/etp-commands.in | 8 ++++----
 erts/etc/unix/etp-thr.py      | 6 ++++++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index ba35ee7091..1197999618 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -67,7 +67,7 @@ document etp-help
 %   etp-overlapped-heaps, etp-chart, etp-chart-start, etp-chart-end
 %
 % System inspection
-%   etp-system-info, etp-schedulers, etp-process, etp-ports, etp-lc-dump,
+%   etp-system-info, etp-schedulers, etp-processes, etp-ports, etp-lc-dump,
 %   etp-migration-info, etp-processes, etp-processes-x, etp-processes-memory,
 %   etp-compile-info, etp-config-h-info
 %
@@ -140,7 +140,7 @@ define etp-1
   else
     if (($arg0) & 0x3) == 2
       if $etp_flat
-        printf "<etpf-boxed %p>", (($arg0) etp_ptr_mask)
+        printf "<etpf-boxed %p>", (($arg0) & etp_ptr_mask)
       else
         etp-boxed-1 ($arg0) ($arg1)
       end
@@ -1150,7 +1150,7 @@ document etp-mfa
 % 
 % Take an Eterm* to an MFA function name entry and print it.
 % These can be found e.g in the process structure;
-% process_tab[i]->current and process_tab[i]->initial.
+% ((Process*)erts_proc->r.o.tab[i])->current and &(((Process*)erts_proc->r.o.tab[i])->u.initial)
 %---------------------------------------------------------------------------
 end
 
@@ -1627,7 +1627,7 @@ document etp-msgq
 % Sequential trace tokens are included in comments and 
 % the current match position in the queue is marked '<='.
 % 
-% A process's message queue is process_tab[i]->sig_qs.
+% A process's message queue is ((Process*)erts_proc->r.o.tab[i])->sig_qs.
 %---------------------------------------------------------------------------
 end
 
diff --git a/erts/etc/unix/etp-thr.py b/erts/etc/unix/etp-thr.py
index fb82dcaf1f..fef69d5602 100644
--- a/erts/etc/unix/etp-thr.py
+++ b/erts/etc/unix/etp-thr.py
@@ -33,6 +33,12 @@ def get_thread_name(t):
             return "child_waiter";
         elif f.name() == "sched_thread_func":
             return "scheduler";
+        elif f.name() == "sched_dirty_cpu_thread_func":
+            return "dirty_cpu_scheduler";
+        elif f.name() == "sched_dirty_io_thread_func":
+            return "dirty_io_scheduler";
+        elif f.name() == "poll_thread":
+            return "poll_thread";
         elif f.name() == "aux_thread":
             return "aux";
         f = f.older();
-- 
2.26.2

openSUSE Build Service is sponsored by