SLTozer wrote:
> IIRC, there are still some open review threads in this PR, mainly related to
> reducing duplication in the symbolication bits.
Yes, this part won't land quite yet; as I'm kicking these reviews back into
action, I'll be pushing up some other reviews to come before this one in t
jryans wrote:
IIRC, there are still some open review threads in this PR, mainly related to
reducing duplication in the symbolication bits.
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/107369
>From e45d7e68a371a09ea766c4accf8edc6c030fd7fd Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 4 Sep 2024 12:09:50 +0100
Subject: [PATCH 1/4] Add CMake option to enable expensive line number origin
trac
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() {
void Instruction::copyMetadata(const Instruction &SrcInst,
ArrayRef WL) {
+ if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg))
+setDebugLoc(SrcInst.getDebugLoc());
--
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() {
void Instruction::copyMetadata(const Instruction &SrcInst,
ArrayRef WL) {
+ if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg))
+setDebugLoc(SrcInst.getDebugLoc());
--
@@ -48,22 +64,29 @@ namespace llvm {
Temporary
};
- // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify
- // to ignore intentionally-empty DebugLocs.
- class DILocAndCoverageTracking : public TrackingMDNodeRef {
+ // Extends TrackingMDNodeRef
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
@@ -48,22 +64,29 @@ namespace llvm {
Temporary
};
- // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify
- // to ignore intentionally-empty DebugLocs.
- class DILocAndCoverageTracking : public TrackingMDNodeRef {
+ // Extends TrackingMDNodeRef
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -487,14 +490,15 @@ def Main():
if bugs_metadata == "DILocation":
try:
+origin = bug["origin"]
action = bug["action"]
bb_name = bug["bb-name"]
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -115,6 +138,23 @@ namespace llvm {
DebugLocKind getKind() const { return Loc.Kind; }
#endif
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#error Cannot enable DebugLoc origin-tracking without coverage-tracking!
+#endif
jr
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
@@ -115,6 +138,23 @@ namespace llvm {
DebugLocKind getKind() const { return Loc.Kind; }
#endif
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#error Cannot enable DebugLoc origin-tracking without coverage-tracking!
+#endif
SL
@@ -487,14 +490,15 @@ def Main():
if bugs_metadata == "DILocation":
try:
+origin = bug["origin"]
action = bug["action"]
bb_name = bug["bb-name"]
@@ -48,22 +64,29 @@ namespace llvm {
Temporary
};
- // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify
- // to ignore intentionally-empty DebugLocs.
- class DILocAndCoverageTracking : public TrackingMDNodeRef {
+ // Extends TrackingMDNodeRef
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
@@ -115,6 +138,23 @@ namespace llvm {
DebugLocKind getKind() const { return Loc.Kind; }
#endif
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#error Cannot enable DebugLoc origin-tracking without coverage-tracking!
+#endif
jr
@@ -487,14 +490,15 @@ def Main():
if bugs_metadata == "DILocation":
try:
+origin = bug["origin"]
action = bug["action"]
bb_name = bug["bb-name"]
@@ -28,6 +31,11 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/JSON.h"
#include
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+// We need the Signals header to operate on stacktraces if we're using DebugLoc
jryans wrote:
stacktrace -> stack trace
http
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
@@ -50,11 +50,15 @@ class TargetRegisterInfo;
class MergePotentialsElt {
unsigned Hash;
MachineBasicBlock *Block;
- DebugLoc BranchDebugLoc;
+ // We use MDNode rather than DebugLoc here because under certain CMake
+ // options*, DebugLoc may conta
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() {
void Instruction::copyMetadata(const Instruction &SrcInst,
ArrayRef WL) {
+ if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg))
+setDebugLoc(SrcInst.getDebugLoc());
--
@@ -55,6 +73,28 @@ namespace sys {
///specified, the entire frame is printed.
void PrintStackTrace(raw_ostream &OS, int Depth = 0);
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#ifdef NDEBUG
+#error DebugLoc origin-tracking should not be enabled in Release builds.
+#endif
https://github.com/jryans requested changes to this pull request.
More exciting work! 😄 Seems roughly sensible, but appears to duplicate some
code that can hopefully be shared.
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing l
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
SLTozer wrote:
> @SLTozer What's in patches 4 and 5...? I keep putting off looking at this
> stack, as I've been waiting for the whole series to appear (perhaps
> incorrectly)...
Patches 4 and 5 are less consequential, but I'll open them up - patch 4 is
adding origin-tracking support to the I
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/107369
>From e45d7e68a371a09ea766c4accf8edc6c030fd7fd Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 4 Sep 2024 12:09:50 +0100
Subject: [PATCH 1/3] Add CMake option to enable expensive line number origin
trac
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
5f05d5ec8f9bb15c0ac29fce843a2c73165ac414...194069a26418fc4dbb27cee13d5b4263588320b7
llvm/
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 5f05d5ec8f9bb15c0ac29fce843a2c73165ac414
194069a26418fc4dbb27cee13d5b4263588320b7 --e
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Stephen Tozer (SLTozer)
Changes
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This patch adds an
origin-tracking feature, which collects a stack trace at the po
llvmbot wrote:
@llvm/pr-subscribers-debuginfo
@llvm/pr-subscribers-platform-windows
Author: Stephen Tozer (SLTozer)
Changes
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This patch adds an
origin-tracking featu
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/107369
This is part of a series of patches that tries to improve DILocation bug
detection in Debugify; see below for more details. This patch adds an
origin-tracking feature, which collects a stack trace at the point
35 matches
Mail list logo