summaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/Debugging
AgeCommit message (Collapse)Author
2025-05-20Revert "[llvm][NFC] Use `llvm::sort()`" (#140668)Iris Shi
2025-05-17[llvm][NFC] Use `llvm::sort()` (#140335)Iris Shi
2025-04-16[llvm] Use llvm::append_range (NFC) (#135931)Kazu Hirata
2025-03-17[NFC][DebugInfo] Wrap DILineInfo return type with std::optional to handle ↵Zequan Wu
missing debug info. (#129792) Currently, `DIContext::getLineInfoForAddress` and `DIContext::getLineInfoForDataAddress` returns empty DILineInfo when the debug info is missing for the given address. This is not differentiable with the case when debug info is found for the given address but the debug info is default value (filename:linenum is <invalid>:0). This change wraps the return types of `DIContext::getLineInfoForAddress` and `DIContext::getLineInfoForDataAddress` with `std::optional`.
2025-03-11[ExecutionEngine] Avoid repeated hash lookups (NFC) (#130707)Kazu Hirata
2025-02-06[JITLink] Add a jitlink::Symbol::getSection() convenience method.Lang Hames
`Sym.getSection()` is equivalent to `Sym.getBlock().getSection()`.
2025-01-20[ORC] Add BinaryFormat dependence to the LLVMOrcDebugging library.Lang Hames
This is needed as of 630139460ea7 for MachO::getCPUType and MachO::getCPUSubType.
2025-01-20[ORC] Use BinaryFormat to convert Triple to MachO cputype / cpusubtype values.Lang Hames
2025-01-03[ORC] Fix bug in source file name finding in DebuggerSupportPlugin.Lang Hames
The debug section map was using MachO section names (with the "__" prefix), but DWARFContext expects section names with the object format prefix stripped off. This was preventing DWARFContext from accessing the debug_str section, resulting in bogus source name strings.
2024-12-06[JITLink] Switch to SymbolStringPtr for Symbol names (#115796)Jared Wyles
Use SymbolStringPtr for Symbol names in LinkGraph. This reduces string interning on the boundary between JITLink and ORC, and allows pointer comparisons (rather than string comparisons) between Symbol names. This should improve the performance and readability of code that bridges between JITLink and ORC (e.g. ObjectLinkingLayer and ObjectLinkingLayer::Plugins). To enable use of SymbolStringPtr a std::shared_ptr<SymbolStringPool> is added to LinkGraph and threaded through to its construction sites in LLVM and Bolt. All LinkGraphs that are to have symbol names compared by pointer equality must point to the same SymbolStringPool instance, which in ORC sessions should be the pool attached to the ExecutionSession. --------- Co-authored-by: Lang Hames <lhames@gmail.com>
2024-11-19[ExecutionEngine] Remove unused includes (NFC) (#116749)Kazu Hirata
Identified with misc-include-cleaner.
2024-10-01[ExecutionEngine] Avoid repeated hash lookups (NFC) (#110621)Kazu Hirata
2024-06-25Revert "[llvm] Use llvm::sort (NFC) (#96434)"Kazu Hirata
This reverts commit 05d167fc201b4f2e96108be0d682f6800a70c23d. Reverting the patch fixes the following under EXPENSIVE_CHECKS: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir LLVM :: CodeGen/AMDGPU/sched-group-barrier-pre-RA.mir LLVM :: CodeGen/PowerPC/aix-xcoff-used-with-stringpool.ll LLVM :: CodeGen/PowerPC/merge-string-used-by-metadata.mir LLVM :: CodeGen/PowerPC/mergeable-string-pool-large.ll LLVM :: CodeGen/PowerPC/mergeable-string-pool-pass-only.mir LLVM :: CodeGen/PowerPC/mergeable-string-pool.ll
2024-06-23[llvm] Use llvm::sort (NFC) (#96434)Kazu Hirata
2024-03-07[ORC][JITLink] Add Intel VTune support to JITLink (#83957)Hongyu Chen
[ORC] Re-land https://github.com/llvm/llvm-project/pull/81826 This patch adds two plugins: VTuneSupportPlugin.cpp and JITLoaderVTune.cpp. The testing is done in a manner similar to llvm-jitlistener. Currently, we only support the old version of Intel VTune API.
2024-03-04Revert "[ORC][JITLink] Add Intel VTune support to JITLink (#81826)"Jordan Rupprecht
This reverts commit 17efdad2296a2757813e4f11d0575ee6fb826e39. It introduces a layering violation: https://github.com/llvm/llvm-project/pull/81826#issuecomment-1977455140
2024-03-04[ORC][JITLink] Add Intel VTune support to JITLink (#81826)Hongyu Chen
This patch adds two plugins: VTuneSupportPlugin.cpp and JITLoaderVTune.cpp. The testing is done in a manner similar to llvm-jitlistener. Currently, we only support the old version of Intel VTune API. This pull request is stacked on top of https://github.com/llvm/llvm-project/pull/81825
2023-12-25[llvm] Use StringRef::consume_front (NFC)Kazu Hirata
2023-12-11[llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)Kazu Hirata
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
2023-12-11[llvm-c] Expose debug support for LLJIT in Orc C-API bindings (#73257)Stefan Gränitz
Allow C-API users to debug their JITed code via the GDB JIT Interface. This is currently supported on ELF and MachO based platforms. On other systems `LLVMOrcLLJITEnableDebugSupport()` returns an error. This patch adds a new C-API header `LLJITUtils.h`, which can host further advanced JIT features in the future. Using the header requires linking against LLVMOrcDebugging.
2023-11-30[llvm] Stop including llvm/ADT/StringSet.h (NFC)Kazu Hirata
Identified with clangd.
2023-10-12Use llvm::endianness::{big,little,native} (NFC)Kazu Hirata
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class as opposed to an enum. This patch replaces support::{big,little,native} with llvm::endianness::{big,little,native}.
2023-10-10Use llvm::endianness (NFC)Kazu Hirata
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces support::endianness with llvm::endianness.
2023-10-10[llvm] Use llvm::endianness::{big,little,native} (NFC)Kazu Hirata
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces support::endianness::{big,little,native} with llvm::endianness::{big,little,native}.
2023-10-01[ExecutionEngine] Fix the call to DWARFContext::createKazu Hirata
Without this patch, we pass G.getEndianness() as one of the parameters to DWARFContext::create. The problem is that G.getEndianness() is of: enum endianness {big, little, native}; whereas DWARFContext::create is expecting "bool isLittleEndian". That is, we are relying on an implicit conversion to convert big and little to false and true, respectively. When we migrate llvm::support::endianness to std::endian in future, we can no longer rely on an implicit conversion because std::endian is declared with "enum class". Even if we could, the conversion would not be guaranteed to work because, for example, libcxx defines: enum class endian { little = 0xDEAD, big = 0xFACE, : where big and little are not boolean values. This patch fixes the problem by properly converting G.getEndianness() to a boolean value.
2023-09-29[ORC] Fix heap-use-after-free error in MachODebugObjectSynthesizer.cppMogball
At line 191, `addSymbol` takes the name by reference but does not make an internal copy to the string, meaning the local `optional<std::string>` would get freed and leave Orc with a dangling pointer. Fix this by just using an `optional<StringRef>` instead.
2023-09-28[ORC] Add JITLink to dependencies of OrcDebugging.Lang Hames
The OrcDebugging library depends on JITLink after b2518971d82.
2023-09-28Re-apply "[ORC] Add N_SO and N_OSO stabs entries to MachO debug..." with fixes.Lang Hames
This re-applies db51e572893, which was reverted in 05b1a2cb3e6 due to bot failures. The DebuggerSupportPlugin now depends on DWARF, so it has been moved to the new OrcDebugging library (as has the enableDebuggerSupport API).
2023-09-28[ORC] Add DWARFContext generation from LinkGraphs, use in perf support.Prem Chintalapudi
This patch adds line numbers to perf jitdump records emitted by the PerfSupportPlugin, by parsing and using a DWARFContext from preserved debug sections. To avoid making the OrcJIT library depend on DebugInfoDWARF this patch introduces a new OrcDebugging library. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D146391