summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-08-15 12:58:14 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-15 13:38:24 +0200
commitcebf8ae3b72cd54d42a570c27612892022700fb2 (patch)
treee624184b66e618797f48f05dd30918e33b973e1c
parent46e53417c928726da38ecfe235dec685c288caa3 (diff)
downloadserenity-cebf8ae3b72cd54d42a570c27612892022700fb2.zip
SystemMonitor: ProcessStack is now ThreadStack
This is a follow-up to #3095. In particular: https://github.com/SerenityOS/serenity/pull/3095#discussion_r469113354
-rw-r--r--Applications/SystemMonitor/CMakeLists.txt2
-rw-r--r--Applications/SystemMonitor/ThreadStackWidget.cpp (renamed from Applications/SystemMonitor/ProcessStackWidget.cpp)10
-rw-r--r--Applications/SystemMonitor/ThreadStackWidget.h (renamed from Applications/SystemMonitor/ProcessStackWidget.h)8
-rw-r--r--Applications/SystemMonitor/main.cpp4
4 files changed, 12 insertions, 12 deletions
diff --git a/Applications/SystemMonitor/CMakeLists.txt b/Applications/SystemMonitor/CMakeLists.txt
index 9f3839d610..9408525348 100644
--- a/Applications/SystemMonitor/CMakeLists.txt
+++ b/Applications/SystemMonitor/CMakeLists.txt
@@ -7,8 +7,8 @@ set(SOURCES
ProcessFileDescriptorMapWidget.cpp
ProcessMemoryMapWidget.cpp
ProcessModel.cpp
- ProcessStackWidget.cpp
ProcessUnveiledPathsWidget.cpp
+ ThreadStackWidget.cpp
)
serenity_bin(SystemMonitor)
diff --git a/Applications/SystemMonitor/ProcessStackWidget.cpp b/Applications/SystemMonitor/ThreadStackWidget.cpp
index 884c740170..3b7e677192 100644
--- a/Applications/SystemMonitor/ProcessStackWidget.cpp
+++ b/Applications/SystemMonitor/ThreadStackWidget.cpp
@@ -24,13 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "ProcessStackWidget.h"
+#include "ThreadStackWidget.h"
#include <AK/ByteBuffer.h>
#include <LibCore/File.h>
#include <LibCore/Timer.h>
#include <LibGUI/BoxLayout.h>
-ProcessStackWidget::ProcessStackWidget()
+ThreadStackWidget::ThreadStackWidget()
{
set_layout<GUI::VerticalBoxLayout>();
layout()->set_margins({ 4, 4, 4, 4 });
@@ -40,11 +40,11 @@ ProcessStackWidget::ProcessStackWidget()
m_timer = add<Core::Timer>(1000, [this] { refresh(); });
}
-ProcessStackWidget::~ProcessStackWidget()
+ThreadStackWidget::~ThreadStackWidget()
{
}
-void ProcessStackWidget::set_ids(pid_t pid, pid_t tid)
+void ThreadStackWidget::set_ids(pid_t pid, pid_t tid)
{
if (m_pid == pid && m_tid == tid)
return;
@@ -53,7 +53,7 @@ void ProcessStackWidget::set_ids(pid_t pid, pid_t tid)
refresh();
}
-void ProcessStackWidget::refresh()
+void ThreadStackWidget::refresh()
{
auto file = Core::File::construct(String::format("/proc/%d/stacks/%d", m_pid, m_tid));
if (!file->open(Core::IODevice::ReadOnly)) {
diff --git a/Applications/SystemMonitor/ProcessStackWidget.h b/Applications/SystemMonitor/ThreadStackWidget.h
index 08c9f427c5..5a10e93b0a 100644
--- a/Applications/SystemMonitor/ProcessStackWidget.h
+++ b/Applications/SystemMonitor/ThreadStackWidget.h
@@ -29,16 +29,16 @@
#include <LibGUI/TextEditor.h>
#include <LibGUI/Widget.h>
-class ProcessStackWidget final : public GUI::Widget {
- C_OBJECT(ProcessStackWidget)
+class ThreadStackWidget final : public GUI::Widget {
+ C_OBJECT(ThreadStackWidget)
public:
- virtual ~ProcessStackWidget() override;
+ virtual ~ThreadStackWidget() override;
void set_ids(pid_t pid, pid_t tid);
void refresh();
private:
- ProcessStackWidget();
+ ThreadStackWidget();
pid_t m_pid { -1 };
pid_t m_tid { -1 };
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp
index 19fb27dcf7..de5fd827ea 100644
--- a/Applications/SystemMonitor/main.cpp
+++ b/Applications/SystemMonitor/main.cpp
@@ -31,7 +31,7 @@
#include "ProcessFileDescriptorMapWidget.h"
#include "ProcessMemoryMapWidget.h"
#include "ProcessModel.h"
-#include "ProcessStackWidget.h"
+#include "ThreadStackWidget.h"
#include "ProcessUnveiledPathsWidget.h"
#include <LibCore/Timer.h>
#include <LibGUI/AboutDialog.h>
@@ -316,7 +316,7 @@ int main(int argc, char** argv)
auto& memory_map_widget = process_tab_widget.add_tab<ProcessMemoryMapWidget>("Memory map");
auto& open_files_widget = process_tab_widget.add_tab<ProcessFileDescriptorMapWidget>("Open files");
auto& unveiled_paths_widget = process_tab_widget.add_tab<ProcessUnveiledPathsWidget>("Unveiled paths");
- auto& stack_widget = process_tab_widget.add_tab<ProcessStackWidget>("Stack");
+ auto& stack_widget = process_tab_widget.add_tab<ThreadStackWidget>("Stack");
process_table_view.on_selection = [&](auto&) {
auto pid = selected_id(ProcessModel::Column::PID);