[Lldb-commits] [lldb] [lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (PR #104617)

2024-08-19 Thread Fred Grim via lldb-commits
https://github.com/feg208 closed https://github.com/llvm/llvm-project/pull/104617 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (PR #104617)

2024-08-19 Thread Fred Grim via lldb-commits
@@ -120,7 +121,10 @@ TEST_F(ElfCoreTest, PopulatePrpsInfoTest) { ASSERT_EQ(prpsinfo_opt->pr_state, 0); ASSERT_EQ(prpsinfo_opt->pr_sname, 'R'); ASSERT_EQ(prpsinfo_opt->pr_zomb, 0); - ASSERT_EQ(prpsinfo_opt->pr_nice, 0); + int priority = getpriority(PRIO_PROCESS, getpid()

[Lldb-commits] [lldb] [lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (PR #104617)

2024-08-16 Thread Fred Grim via lldb-commits
https://github.com/feg208 created https://github.com/llvm/llvm-project/pull/104617 In implementing this test one of the assertions assumes that the priority is the default in linux (0) but, evidently, some of the build runners prioritize the test to, at least, 5. This ensures that regardless o

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-16 Thread Fred Grim via lldb-commits
https://github.com/feg208 closed https://github.com/llvm/llvm-project/pull/104109 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-16 Thread Fred Grim via lldb-commits
feg208 wrote: Added issue https://github.com/llvm/llvm-project/issues/104609 to track the timeout https://github.com/llvm/llvm-project/pull/104109 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-16 Thread Fred Grim via lldb-commits
feg208 wrote: The build failure here was a timeout in ``` TEST 'lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py' FAILED Script: -- /usr/bin/python3.10 /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-j5dcb-1/llvm-project/gith

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-16 Thread Fred Grim via lldb-commits
@@ -318,6 +318,32 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data, return error; } +static struct compat_timeval +copy_timespecs(const ProcessInstanceInfo::timespec &oth) { + using sec_t = decltype(compat_timeval::tv_sec); + using usec_t = decltype(compat_timev

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-16 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/7] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/6] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/5] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -318,6 +318,32 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data, return error; } +static struct compat_timeval +copy_timespecs(const ProcessInstanceInfo::timespec &oth) { + using sec_t = decltype(compat_timeval::tv_sec); + using usec_t = decltype(compat_timev

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/4] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -318,6 +318,32 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data, return error; } +static struct compat_timeval +copy_timespecs(const ProcessInstanceInfo::timespec &oth) { + using sec_t = decltype(compat_timeval::tv_sec); + using usec_t = decltype(compat_timev

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
@@ -0,0 +1,162 @@ +//===-- ThreadElfCoreTest.cpp *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-15 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/3] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -0,0 +1,162 @@ +//===-- ThreadElfCoreTest.cpp *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/2] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
https://github.com/feg208 created https://github.com/llvm/llvm-project/pull/104109 To create elf core files there are multiple notes in the core file that contain these structs as the note. These populate methods take a Process and produce fully specified structures that can be used to fill th

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-14 Thread Fred Grim via lldb-commits
feg208 wrote: @JDevlieghere and @clayborg sorry for the line noise. It's merged https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-14 Thread Fred Grim via lldb-commits
https://github.com/feg208 closed https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-13 Thread Fred Grim via lldb-commits
feg208 wrote: @JDevlieghere could I talk you into merging this? Somehow I got shifted from the committers group to the triagers group but it's taking time to resolve. https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-c

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-12 Thread Fred Grim via lldb-commits
feg208 wrote: @clayborg I don't have commit access. Can you merge this? https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-11 Thread Fred Grim via lldb-commits
@@ -86,4 +89,22 @@ TEST_F(HostTest, GetProcessInfo) { ProcessInstanceInfo::timespec next_user_time = Info.GetUserTime(); ASSERT_TRUE(user_time.tv_sec <= next_user_time.tv_sec || user_time.tv_usec <= next_user_time.tv_usec); + + struct rlimit rlim; + EXPECT_E

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-11 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From a162f04d6d9f6c879398e4a6883f026bbfbd1e8f Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-10 Thread Fred Grim via lldb-commits
feg208 wrote: @clayborg this pr is ready for re-review. I have also rebased to top of master if that is helpful https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-10 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From b1f09900d764a9b9cbdf839f83817e23dd89851a Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-06-03 Thread Fred Grim via lldb-commits
feg208 wrote: @clayborg This pr is ready for re-review https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-28 Thread Fred Grim via lldb-commits
feg208 wrote: @clayborg This pr is ready for re-review https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
feg208 wrote: @clayborg I rolled up those requested changes. That'll make a nicer interface https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-c

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo { return m_process_session_id != LLDB_INVALID_PROCESS_ID; } - struct timespec GetUserTime() const { return m_user_time; } + struct timespec GetUserTime() const { return m_user_time.value(); } voi

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo { lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID; - struct timespec m_user_time

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo { lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID; lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID; - struct timespec m_user_time

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
https://github.com/feg208 edited https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo { ProcessInstanceInfo() = default; ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), -m_p

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From 8f694b7ab4436c0540284cbbf280ad557a750920 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
feg208 wrote: > A message like this that the PR is ready for re-review should be all you > need. Several folks left comments and they might be waiting for all of them > to be addressed before they take another look. Ok. @clayborg I think I have addressed your concerns but I'd love another lo

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From e7b1cf56dae4c93b871aeeeafc5b40752baf823e Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-20 Thread Fred Grim via lldb-commits
feg208 wrote: Hello all. I am wondering what I can do to advance this patch? I think it is required to support process save-core in linux for lldb. I'd love to move this before adding static methods in ThreadEfCore.h to produce populated prpsinfo and prstatus structs for inclusion in a generat

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-15 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From 8b9ffe9bfb20c5c911c1c08ef966b4ac1ac587a0 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-15 Thread Fred Grim via lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo { ProcessInstanceInfo() = default; ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), -m_p

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-15 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From b35ded1c20bb67df941bb7c54aece789a18cde99 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From dbb4b4126754be15ffd9d12d9997e4969f7ba5cf Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo { ProcessInstanceInfo() = default; ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), -m_p

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo { ProcessInstanceInfo() = default; ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid) - : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX), -m_p

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
feg208 wrote: > Sorry for the nits! I am not smart enough to contribute on the technical > merits, so I am trying to find some way to help! Ehhh grammar is not where I shine. I rolled them up https://github.com/llvm/llvm-project/pull/91544 ___ lldb-c

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -70,6 +71,12 @@ struct StatFields { long unsigned stime; long cutime; long cstime; + // in proc_pid_stat(5) this field is specified as priority feg208 wrote: done https://github.com/llvm/llvm-project/pull/91544 __

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -70,6 +71,12 @@ struct StatFields { long unsigned stime; long cutime; long cstime; + // in proc_pid_stat(5) this field is specified as priority + // but documented as realtime priority. To keep with the adopted + // nomenclature in ProcessInstanceInfo we adopt the d

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -70,6 +71,12 @@ struct StatFields { long unsigned stime; long cutime; long cstime; + // in proc_pid_stat(5) this field is specified as priority + // but documented as realtime priority. To keep with the adopted + // nomenclature in ProcessInstanceInfo we adopt the d

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -115,13 +124,19 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo, return ts; }; + // priority (nice) values run from 19 to -20 inclusive (in linux). In the feg208 wrote: done https://github.com/llvm/llvm-project/pull/9154

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -115,13 +124,19 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo, return ts; }; + // priority (nice) values run from 19 to -20 inclusive (in linux). In the + // prpsinfo struct pr_nice is a char feg208 wrote: done https:

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
@@ -86,4 +89,22 @@ TEST_F(HostTest, GetProcessInfo) { ProcessInstanceInfo::timespec next_user_time = Info.GetUserTime(); ASSERT_TRUE(user_time.tv_sec <= next_user_time.tv_sec || user_time.tv_usec <= next_user_time.tv_usec); + + struct rlimit rlim; + EXPECT_E

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-13 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From d01efd10f8a4b7d908acaa3237541bf6a83b4c7c Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-10 Thread Fred Grim via lldb-commits
@@ -144,6 +144,19 @@ class ProcessInstanceInfo : public ProcessInfo { long int tv_usec = 0; }; + enum class ProcessState { +Unknown, +Dead, +DiskSleep, +Idle, +Paging, +Parked, +Running, +Sleeping, +TracedOrStopped, +Zombie, + };

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-10 Thread Fred Grim via lldb-commits
@@ -91,14 +87,16 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo, if (Rest.empty()) return false; StatFields stat_fields; - if (sscanf(Rest.data(), - "%d %s %c %d %d %d %d %d %u %lu %lu %lu %lu %lu %lu %ld %ld", - &st

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-10 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From dbf56b2ebe93d2f3ef6e41bceb7359f6e10ae38d Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-10 Thread Fred Grim via lldb-commits
@@ -254,6 +280,8 @@ class ProcessInstanceInfo : public ProcessInfo { struct timespec m_system_time {}; struct timespec m_cumulative_user_time {}; struct timespec m_cumulative_system_time {}; + std::optional m_priority_value = std::nullopt; + bool m_zombie = false; -

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -237,6 +250,16 @@ class ProcessInstanceInfo : public ProcessInfo { m_cumulative_system_time.tv_usec > 0; } + int8_t GetNiceValue() const { return m_nice_value; } feg208 wrote: prpsinfo has pr_nice field to be populated https://github.com/llv

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -237,6 +250,16 @@ class ProcessInstanceInfo : public ProcessInfo { m_cumulative_system_time.tv_usec > 0; } + int8_t GetNiceValue() const { return m_nice_value; } feg208 wrote: Done. Agreed. I also added a note in the linux specific code. In l

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -237,6 +250,16 @@ class ProcessInstanceInfo : public ProcessInfo { m_cumulative_system_time.tv_usec > 0; } + int8_t GetNiceValue() const { return m_nice_value; } + + void SetNiceValue(int8_t nice_value) { m_nice_value = nice_value; } + + bool NiceValueIsVali

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -17,6 +17,7 @@ #include #include +#include feg208 wrote: removed https://github.com/llvm/llvm-project/pull/91544 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -117,6 +118,10 @@ bool ProcessInfo::IsScriptedProcess() const { return m_scripted_metadata_sp && *m_scripted_metadata_sp; } +bool ProcessInstanceInfo::NiceValueIsValid() const { + return m_nice_value >= PRIO_MIN && m_nice_value <= PRIO_MAX; feg208 wrote:

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From 18b0d55d1c4e04842e531c7f7e304998f2b2ad4e Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -12,6 +12,9 @@ #include "lldb/Utility/ProcessInfo.h" #include "gtest/gtest.h" +#include +#include feg208 wrote: yeah. The cmake file enforces a linux-only build as well. However as @jimingham pointed out someone could plausibly move this into a non-linu

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -254,6 +277,8 @@ class ProcessInstanceInfo : public ProcessInfo { struct timespec m_system_time {}; struct timespec m_cumulative_user_time {}; struct timespec m_cumulative_system_time {}; + int8_t m_nice_value = INT8_MAX; feg208 wrote: yeah. I'll mak

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-09 Thread Fred Grim via lldb-commits
@@ -144,6 +144,19 @@ class ProcessInstanceInfo : public ProcessInfo { long int tv_usec = 0; }; + enum class ProcessState { +Unknown, +Dead, +DiskSleep, +Idle, +Paging, +Parked, +Running, +Sleeping, +TracedOrStopped, +Zombie, + };

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-08 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/91544 >From 57e47b53682d43d2b1febba721688c6931c43291 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Wed, 8 May 2024 15:36:16 -0700 Subject: [PATCH] [lldb] Adds additional fields to ProcessInfo To implement SaveCore for

[Lldb-commits] [lldb] [lldb] Adds additional fields to ProcessInfo (PR #91544)

2024-05-08 Thread Fred Grim via lldb-commits
https://github.com/feg208 created https://github.com/llvm/llvm-project/pull/91544 To implement SaveCore for elf binaries we need to populate some additional fields in the prpsinfo struct. Those fields are the nice value of the process whose core is to be taken as well as a boolean flag indicat

[Lldb-commits] [lldb] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints. (PR #89637)

2024-04-25 Thread Fred Grim via lldb-commits
https://github.com/feg208 closed https://github.com/llvm/llvm-project/pull/89637 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints. (PR #89637)

2024-04-24 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/89637 >From 41175787b1f5d1451d5ea88618ca6c229a415c0f Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Mon, 22 Apr 2024 10:17:14 -0700 Subject: [PATCH] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints

[Lldb-commits] [lldb] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints. (PR #89637)

2024-04-24 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/89637 >From edc21c6ec34486b6155ef0ec6f6be97a9bd0f0bb Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Mon, 22 Apr 2024 10:17:14 -0700 Subject: [PATCH] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints

[Lldb-commits] [lldb] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints. (PR #89637)

2024-04-24 Thread Fred Grim via lldb-commits
https://github.com/feg208 edited https://github.com/llvm/llvm-project/pull/89637 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints This test was commented out which, besides being bad form, disabled the test entirely. But we do want to val

2024-04-24 Thread Fred Grim via lldb-commits
https://github.com/feg208 edited https://github.com/llvm/llvm-project/pull/89637 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] I left some commented code in. This test doesn't run reliably in the different build bots (PR #89637)

2024-04-24 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/89637 >From bd0416d37d61e71f36e9afc435f9209b544bdb78 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Mon, 22 Apr 2024 10:17:14 -0700 Subject: [PATCH] [lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints

[Lldb-commits] [lldb] I left some commented code in. This test doesn't run reliably in the different build bots (PR #89637)

2024-04-24 Thread Fred Grim via lldb-commits
feg208 wrote: > Hi @feg208 , I noticed that your [previous commit > ](https://github.com/llvm/llvm-project/pull/89267) has a very.. unusual > commit title and message. The same thing applies to this PR. > > I'd appreciate it if you could follow a more standard commit title and > message, so t

[Lldb-commits] [lldb] I left some commented code in. This test doesn't run reliably in the different build bots (PR #89637)

2024-04-24 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/89637 >From 9ef4220b01a9cb18c3f23b78ae7aa3b80c2a7851 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Mon, 22 Apr 2024 10:17:14 -0700 Subject: [PATCH] I left some commented code in. This test doesn't run reliably in the

[Lldb-commits] [lldb] I left some commented code in. This test doesn't run reliably in the different build bots (PR #89637)

2024-04-23 Thread Fred Grim via lldb-commits
feg208 wrote: > A potential compromise would be to check that the time is great or equal? That's a good idea. I'll make that change and add a note https://github.com/llvm/llvm-project/pull/89637 ___ lldb-commits mailing list lldb-commits@lists.llvm.or

[Lldb-commits] [lldb] I left some commented code in. This test doesn't run reliably in the different build bots (PR #89637)

2024-04-22 Thread Fred Grim via lldb-commits
https://github.com/feg208 created https://github.com/llvm/llvm-project/pull/89637 @jimingham I am wondering if you are ok removing this test? It caused failures in some of the build bots because the user time was less than a microsecond. Alternatively we can increase the number of loops or may

[Lldb-commits] [lldb] this test is flakey on arm in linux because I got too clever (PR #89267)

2024-04-18 Thread Fred Grim via lldb-commits
https://github.com/feg208 closed https://github.com/llvm/llvm-project/pull/89267 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] this test is flakey on arm in linux because I got too clever (PR #89267)

2024-04-18 Thread Fred Grim via lldb-commits
feg208 wrote: I had to just comment this test out because it randomly fails on at least x86_64 and arm https://github.com/llvm/llvm-project/pull/89267 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[Lldb-commits] [lldb] this test is flakey on arm in linux because I got too clever (PR #89267)

2024-04-18 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/89267 >From 24fa0fc2f54ef4141302ed7178ee0dc1b6d6af4e Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Thu, 18 Apr 2024 10:13:03 -0700 Subject: [PATCH] this test is flakey on arm in linux because I got too clever --- lld

[Lldb-commits] [lldb] this test is flakey on arm in linux because I got too clever (PR #89267)

2024-04-18 Thread Fred Grim via lldb-commits
https://github.com/feg208 created https://github.com/llvm/llvm-project/pull/89267 the assembly jazz doesn't work on arm. oops >From 13e982588d75b240ce515c8ff1b2d9c89a595908 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Thu, 18 Apr 2024 10:13:03 -0700 Subject: [PATCH] this test is flakey on ar

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-18 Thread Fred Grim via lldb-commits
https://github.com/feg208 closed https://github.com/llvm/llvm-project/pull/88995 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
feg208 wrote: > Yes, you'd have to put this test into a host test for a system that doesn't > support this, like use the Posix one or make one for the Windows or Darwin > Hosts. Done! https://github.com/llvm/llvm-project/pull/88995 ___ lldb-commits

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/88995 >From 9b8ec4d0c31ad1b228add56bc27cd79457e515c7 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 16 Apr 2024 14:46:37 -0700 Subject: [PATCH 1/3] adds additional information to the ProcessInfo object for elf pro

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
feg208 wrote: > It should never decrease, however. If you were just getting garbage values, > then there should be a roughly even chance the second value will be less than > the first. So this still gives some confidence this isn't totally bogus... For sure. My concern is that it wouldn't incr

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
feg208 wrote: > That test looks good. It seems unlikely that you would buggily always produce > monotonically increasing times... > > Not to be a pest, but since this info is only provided on Linux, we should > maybe add a test to make sure that asking for this information on systems > that d

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
feg208 wrote: > That test looks good. It seems unlikely that you would buggily always produce > monotonically increasing times... > > Not to be a pest, but since this info is only provided on Linux, we should > maybe add a test to make sure that asking for this information on systems > that d

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/88995 >From 9b8ec4d0c31ad1b228add56bc27cd79457e515c7 Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 16 Apr 2024 14:46:37 -0700 Subject: [PATCH 1/2] adds additional information to the ProcessInfo object for elf pro

[Lldb-commits] [lldb] adds additional information to the ProcessInfo object for elf processes (PR #88995)

2024-04-17 Thread Fred Grim via lldb-commits
feg208 wrote: > The user and system times should be monotonically increasing. So you could > stop at a breakpoint, fetch the times, then run your program through a little > spin loop to burn some CPU before hitting a second breakpoint. Then get the > times again and assert that they are > the

  1   2   >