SuccessChanges

Summary

  1. Added "auto" for LLVMBuildFactory enable_runtimes arg; changed default to not use enable_runtimes. (details)
Commit f7b888457641941a8e6024f36ee2e5ddc53695d5 by gkistanova
Added "auto" for LLVMBuildFactory enable_runtimes arg; changed default to not use enable_runtimes.
The file was modifiedzorg/buildbot/process/factory.py (diff)

Summary

  1. [llvm-objcopy] --dump-section: error if '=' is missing or filename is empty (details)
  2. [lldb/Symbol] Update SymbolFilePDB unitest with SourceLocationSpec (details)
  3. [lldb/Symbol] Fix typo in SymbolFilePDBTests (NFC) (details)
  4. [sanitizer_common] Recycle StackDepot memory (details)
  5. [dfsan] Add a DFSan allocator (details)
  6. Revert "[sanitizer_common] Recycle StackDepot memory" (details)
  7. [trace] Dedup different source lines when dumping instructions + refactor (details)
Commit 96f3a6307670bc6c79c44bf01be507dd8a1af30e by i
[llvm-objcopy] --dump-section: error if '=' is missing or filename is empty

Fix PR45416: the diagnostic when '=' is missing is misleading.
`FileOutputBuffer::create` returns successfully when the filename is empty
(the temporary file is `.tmp%%%%%%%`), but `FileOutputBuffer::commit` will error when
renaming `.tmp%%%%%%%` to the empty name).

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D101697
The file was modifiedllvm/test/tools/llvm-objcopy/ELF/dump-section.test
The file was modifiedllvm/tools/llvm-objcopy/CopyConfig.cpp
Commit 30fcdf0b196600001ca77767bd41ceba03f5dd33 by medismail.bennani
[lldb/Symbol] Update SymbolFilePDB unitest with SourceLocationSpec

This patch should fix the windows test failure following `3e2ed7440569`.

It makes use of a `SourceLocationSpec` object  when resolving a symbol
context from `SymbolFilePDB` file.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
Commit d5069dace7c254a6c2c878bde465344eb6c0cf56 by medismail.bennani
[lldb/Symbol] Fix typo in SymbolFilePDBTests (NFC)

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
Commit 78804e6b20943f218f4b4a1867f600cf4744ffbd by jianzhouzh
[sanitizer_common] Recycle StackDepot memory

This relates to https://reviews.llvm.org/D95835.

In DFSan origin tracking we use StackDepot to record
stack traces and origin traces (like MSan origin tracking).

For at least two reasons, we wanted to control StackDepot's memory cost
1) We may use DFSan origin tracking to monitor programs that run for
   many days. This may eventually use too much memory for StackDepot.
2) DFSan supports flush shadow memory to reduce overhead. After flush,
   all existing IDs in StackDepot are not valid because no one will
   refer to them.
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h
Commit 1fb612d060e7dc72610b4e83238e5561752fe737 by jianzhouzh
[dfsan] Add a DFSan allocator

This is a part of https://reviews.llvm.org/D101204

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D101666
The file was addedcompiler-rt/lib/dfsan/dfsan_allocator.cpp
The file was addedcompiler-rt/lib/dfsan/dfsan_allocator.h
The file was modifiedcompiler-rt/lib/dfsan/dfsan_thread.h
The file was modifiedcompiler-rt/lib/dfsan/dfsan_flags.inc
The file was modifiedcompiler-rt/lib/dfsan/dfsan_thread.cpp
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
The file was modifiedcompiler-rt/lib/dfsan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/dfsan/dfsan.h
Commit bf4e1cf80a15fdf6f08dbb93de385a032fce69fd by jianzhouzh
Revert "[sanitizer_common] Recycle StackDepot memory"

This reverts commit 78804e6b20943f218f4b4a1867f600cf4744ffbd.
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h
Commit ade59d530964e28498051ab20e44cbf6594be595 by walter erquinigo
[trace] Dedup different source lines when dumping instructions + refactor

When dumping the traced instructions in a for loop, like this one

  4:  for (int a = 0; a < n; a++)
  5:    do something;

there might be multiple LineEntry objects for line 4, but with different address ranges. This was causing the dump command to dump something like this:

```
  a.out`main + 11 at main.cpp:4
    [1] 0x0000000000400518    movl   $0x0, -0x8(%rbp)
    [2] 0x000000000040051f    jmp    0x400529                  ; <+28> at main.cpp:4
  a.out`main + 28 at main.cpp:4
    [3] 0x0000000000400529    cmpl   $0x3, -0x8(%rbp)
    [4] 0x000000000040052d    jle    0x400521                  ; <+20> at main.cpp:5
```

which is confusing, as main.cpp:4 appears twice consecutively.

This diff fixes that issue by making the line entry comparison strictly about the line, column and file name. Before it was also comparing the address ranges, which we don't need because our output is strictly about what the user sees in the source.

Besides, I've noticed that the logic that traverses instructions and calculates symbols and disassemblies had too much coupling, and made my changes harder to implement, so I decided to decouple it. Now there are two methods for iterating over the instruction of a trace. The existing one does it on raw load addresses, but the one provides a SymbolContext and an InstructionSP, and does the calculations efficiently (not as efficient as possible for now though), so the caller doesn't need to care about these details. I think I'll be using that iterator to reconstruct the call stacks.

I was able to fix a test with this change.

Differential Revision: https://reviews.llvm.org/D100740
The file was modifiedlldb/include/lldb/Target/Trace.h
The file was modifiedlldb/source/Core/AddressRange.cpp
The file was modifiedlldb/include/lldb/Core/AddressRange.h
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
The file was modifiedlldb/source/Target/Trace.cpp
The file was modifiedlldb/test/API/commands/trace/TestTraceStartStop.py

Summary

  1. Added "auto" for LLVMBuildFactory enable_runtimes arg; changed default to not use enable_runtimes. (details)
Commit f7b888457641941a8e6024f36ee2e5ddc53695d5 by gkistanova
Added "auto" for LLVMBuildFactory enable_runtimes arg; changed default to not use enable_runtimes.
The file was modifiedzorg/buildbot/process/factory.py