Page MenuHomePhabricator

djtodoro (Djordje Todorovic)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 14 2017, 6:53 AM (174 w, 5 d)

Recent Activity

Today

djtodoro added a reviewer for D100845: [Debugify][Original DI] Test preservation of original debug var intrinsics in optimizations: dstenb.
Tue, Apr 20, 6:53 AM · Restricted Project, debug-info
djtodoro requested review of D100845: [Debugify][Original DI] Test preservation of original debug var intrinsics in optimizations.
Tue, Apr 20, 5:12 AM · Restricted Project, debug-info
djtodoro requested review of D100844: [DebugInfo] Salvage dbg.value() during ADCE.
Tue, Apr 20, 5:03 AM · Restricted Project, debug-info

Fri, Apr 16

djtodoro added inline comments to D100270: [debug-info] MemCpyOpt should merge the debug location when replace multiple block-local instruction with a new memset.
Fri, Apr 16, 2:54 AM · debug-info, Restricted Project

Thu, Apr 15

djtodoro accepted D99169: [DebugInfo] Replace debug uses in replaceUsesOutsideBlock.

LGTM from my side :)

Thu, Apr 15, 7:12 AM · Restricted Project, debug-info

Wed, Apr 14

djtodoro added a comment to D100371: [debug-info] SCCP should preserve the debug location for an one-to-one instruction replacement.

Yes, @djtodoro, it is in the starting phase, and we plan to improve it and make it an open-source project.

OK, thanks.

Wed, Apr 14, 8:47 AM · Restricted Project, debug-info
djtodoro added a comment to D100371: [debug-info] SCCP should preserve the debug location for an one-to-one instruction replacement.

I think one more place can be improved (I am using https://llvm.org/docs/HowToUpdateDebugInfo.html#test-original-debug-info-preservation-in-optimizations):

Wed, Apr 14, 6:44 AM · Restricted Project, debug-info
djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

After moving the variable InlinedFnsToBeProcessed to inside the for loop, I noticed a difference in two dwarfdump statistics for a quite large binary with fission=yes:

#variables processed by location statistics
#variables with 0% of parent scope covered by DW_AT_location

Since I am not very familiar with this code, I would request if you could investigate and apply the patch.

Hmm, looking at this trying to reproduce the behavior makes me think this wouldn't be the right fix & the change in numbers is probably reflective of a bug in the fix - specifically in LTO situations (where the abstract origin of the function may be in a different CU than the one it's referenced from/inlined into).

But there might be a reasonable alternative fix/improvement - pruning the contents of the list once it has been handled. Possibly sorting the list so it's easy to just visit the elements that need to.

I have taken a look into this and come up with the similar conclusion.
This could be reproduced with the Split DWARF -- when building e.g. GDB project with -gsplit-dwarf option enabled, it triggers the issue. I was struggling to make a simple test case (from a high level) that meets all the requirements, but it is very hard. That is why I've sent the email: https://lists.llvm.org/pipermail/llvm-dev/2021-April/149735.html.

Ah, hmm - why would this come up in Split DWARF, do you think? Split DWARF doesn't have any cross-CU references (the format has no way to encode them) so I'd expect no DIEs to be added to the InlinedFnsToBeProcessed list?

Wed, Apr 14, 5:13 AM · debug-info, Restricted Project
djtodoro added a comment to D100371: [debug-info] SCCP should preserve the debug location for an one-to-one instruction replacement.

@Orlando, thanks for pointing out the debugify usage for me. I indeed use debugify to generate the test cases. I will update test case soon.

@djtodoro, hope it is useful for the debug information updates! We are developing a static analysis tool based on the how-to-update-debug-info guide provided by the community. Some of the test cases are reduced from the test suite which can trigger the potential buggy code location. Some are generated using fuzzing and debugify.

Wed, Apr 14, 3:55 AM · Restricted Project, debug-info

Tue, Apr 13

djtodoro added a comment to D100371: [debug-info] SCCP should preserve the debug location for an one-to-one instruction replacement.

@yuanboli233 Thanks for doing this. I was wondering how did you find these cases? By using debugify?

Tue, Apr 13, 3:37 AM · Restricted Project, debug-info
djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

After moving the variable InlinedFnsToBeProcessed to inside the for loop, I noticed a difference in two dwarfdump statistics for a quite large binary with fission=yes:

#variables processed by location statistics
#variables with 0% of parent scope covered by DW_AT_location

Since I am not very familiar with this code, I would request if you could investigate and apply the patch.

Hmm, looking at this trying to reproduce the behavior makes me think this wouldn't be the right fix & the change in numbers is probably reflective of a bug in the fix - specifically in LTO situations (where the abstract origin of the function may be in a different CU than the one it's referenced from/inlined into).

But there might be a reasonable alternative fix/improvement - pruning the contents of the list once it has been handled. Possibly sorting the list so it's easy to just visit the elements that need to.

Tue, Apr 13, 12:30 AM · debug-info, Restricted Project

Mon, Apr 12

djtodoro added inline comments to D100270: [debug-info] MemCpyOpt should merge the debug location when replace multiple block-local instruction with a new memset.
Mon, Apr 12, 1:18 AM · debug-info, Restricted Project

Sun, Apr 11

djtodoro added inline comments to D100270: [debug-info] MemCpyOpt should merge the debug location when replace multiple block-local instruction with a new memset.
Sun, Apr 11, 11:48 PM · debug-info, Restricted Project
djtodoro accepted D100162: [NFC][Debug] Fix unnecessary deep-copy for vector to save compiling time .

Does this solve the problem?

Sun, Apr 11, 11:15 PM · Restricted Project

Fri, Apr 9

djtodoro added a comment to D99169: [DebugInfo] Replace debug uses in replaceUsesOutsideBlock.

Thanks! LGTM like this...

Fri, Apr 9, 1:00 AM · Restricted Project, debug-info

Wed, Apr 7

djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

This patch seems to be causing a slowdown while running dwarfdump --statistics. It looks like more than 50% of the time is spent in collectZeroCovInlinedVars function.

In function collectStatsForObjectFile, variable InlinedFnsToBeProcessed is being created outside the for loop. It looks like the inline functions to be processed are appended and processed multiple times. I verified that by moving creation of that variable into the for loop, the slowdown goes away.

Can you please take a look!

Wed, Apr 7, 12:53 AM · debug-info, Restricted Project
djtodoro added a comment to D99709: [DebugInfo] Avoid generating DW_TAG_GNU_call_site if no DW_TAG_GNU_call_site_parameter present.

I think some LLDB tests would fail for sure...

Is there LLVM test coverage for this? If not it'd be good to make sure some is added.

Wed, Apr 7, 12:14 AM · Restricted Project, debug-info
djtodoro accepted D99423: [DebugInfo] Fix incorrect updating of SDNode dependencies for variadic debug values.
Wed, Apr 7, 12:10 AM · Restricted Project, debug-info

Tue, Apr 6

djtodoro added inline comments to D99169: [DebugInfo] Replace debug uses in replaceUsesOutsideBlock.
Tue, Apr 6, 6:37 AM · Restricted Project, debug-info
djtodoro added a comment to D99169: [DebugInfo] Replace debug uses in replaceUsesOutsideBlock.

Thanks for this! The results are amazing.

Tue, Apr 6, 5:22 AM · Restricted Project, debug-info
djtodoro added a comment to D99160: [X86][FastISEL] Support DW_TAG_call_site_parameter with FastISEL.

I think that the Debug Entry Values feature should not be enabled by default for non optimized code, so the TargetOptions::ShouldEmitDebugEntryValues() should be patched with checking of optimization level (it should be > 0).

That's currently intended to be already handled by the frontend, right? (clang only sets EnableDebugEntryValues (which ShouldEmitDebugEntryValues checks (hmm, it checks under 'or', not 'and', so I'm not sure where the "only above -O0" is implemented, but it is implemented somewhere?) if optimizations are enabled, yeah?)

Oh, is entry_values actually not conditionalized? It's only the call_site support that's currently conditionalized on "above -O0"?

Tue, Apr 6, 12:59 AM · Restricted Project, Restricted Project, debug-info

Mon, Apr 5

djtodoro added a comment to D99160: [X86][FastISEL] Support DW_TAG_call_site_parameter with FastISEL.

I think that the Debug Entry Values feature should not be enabled by default for non optimized code, so the TargetOptions::ShouldEmitDebugEntryValues() should be patched with checking of optimization level (it should be > 0).

Mon, Apr 5, 8:02 AM · Restricted Project, Restricted Project, debug-info
djtodoro accepted D99830: [DebugInfo, CallSites, test] Fix use of undef FileCheck var.
Mon, Apr 5, 12:05 AM · Restricted Project

Fri, Apr 2

djtodoro added a comment to D99160: [X86][FastISEL] Support DW_TAG_call_site_parameter with FastISEL.

FastISel is normally used only at -O0, I wouldn't expect any parameters to be optimized out at -O0.
The test is running llc with default optimization, which is -O2, and forcing fast-isel; this is not a usual combination and I wouldn't expect us to spend any effort making sure debug info works well with that combination.

If flang is forcing fast-isel even with optimization, that sounds like a problem for flang to solve, not LLVM.

Thanks for your comments. I am sorry as the earlier used options in test case were more confusing than helpful. I have changed that now.
The updated testcase at "-O0" with FastISel does have optimized out parameter, this is because generation of "DW_OP_GNU_entry_value" is enabled starting from "-O0". This causes llvm to generate it whenever it gets opportunity (more local variables to preserve may be the reason).
The concern here is only DW_OP_GNU_entry_value is not sufficient and should be supported with "DW_TAG_GNU_call_site_parameter", which I tried in current patch.

"DW_OP_GNU_entry_value" is enabled starting from "-O0".

I am wondering if this is true...

You can try with testcase attached with this patch.

bash$ llc -O0 -filetype=obj llvm/test/DebugInfo/X86/callsitepar-fastisel.ll -o callsitepar-fastisel.o
bash$ llvm-dwarfdump callsitepar-fastisel.o | grep DW_OP_GNU_entry_value

[0x00000000000000bf, 0x0000000000000101): DW_OP_GNU_entry_value(DW_OP_reg4 RSI))
Fri, Apr 2, 4:31 AM · Restricted Project, Restricted Project, debug-info
djtodoro added a comment to D99160: [X86][FastISEL] Support DW_TAG_call_site_parameter with FastISEL.

FastISel is normally used only at -O0, I wouldn't expect any parameters to be optimized out at -O0.
The test is running llc with default optimization, which is -O2, and forcing fast-isel; this is not a usual combination and I wouldn't expect us to spend any effort making sure debug info works well with that combination.

If flang is forcing fast-isel even with optimization, that sounds like a problem for flang to solve, not LLVM.

Thanks for your comments. I am sorry as the earlier used options in test case were more confusing than helpful. I have changed that now.
The updated testcase at "-O0" with FastISel does have optimized out parameter, this is because generation of "DW_OP_GNU_entry_value" is enabled starting from "-O0". This causes llvm to generate it whenever it gets opportunity (more local variables to preserve may be the reason).
The concern here is only DW_OP_GNU_entry_value is not sufficient and should be supported with "DW_TAG_GNU_call_site_parameter", which I tried in current patch.

Fri, Apr 2, 3:18 AM · Restricted Project, Restricted Project, debug-info

Thu, Apr 1

djtodoro added a comment to D99709: [DebugInfo] Avoid generating DW_TAG_GNU_call_site if no DW_TAG_GNU_call_site_parameter present.

I think some LLDB tests would fail for sure...

Thu, Apr 1, 2:33 AM · Restricted Project, debug-info
djtodoro requested changes to D99709: [DebugInfo] Avoid generating DW_TAG_GNU_call_site if no DW_TAG_GNU_call_site_parameter present.

Actually, the call_site DIE is being used for printing artificial frames for tail calls...

Thu, Apr 1, 2:29 AM · Restricted Project, debug-info

Mon, Mar 29

djtodoro added a comment to D99423: [DebugInfo] Fix incorrect updating of SDNode dependencies for variadic debug values.

LGTM overall (as @jmorse pointed out, if possible, I'd like to see a test case)

Mon, Mar 29, 2:24 AM · Restricted Project, debug-info

Thu, Mar 25

djtodoro committed rG8420a5332486: [Debugify] Expose original debug info preservation check as CC1 option (authored by djtodoro).
[Debugify] Expose original debug info preservation check as CC1 option
Thu, Mar 25, 5:31 AM
djtodoro closed D82547: [Debugify] Expose original debug info preservation check as CC1 option.
Thu, Mar 25, 5:31 AM · Restricted Project, Restricted Project, debug-info
djtodoro added a comment to D82547: [Debugify] Expose original debug info preservation check as CC1 option.

Thanks!

Thu, Mar 25, 4:46 AM · Restricted Project, Restricted Project, debug-info

Wed, Mar 24

djtodoro added a comment to D82547: [Debugify] Expose original debug info preservation check as CC1 option.

I feel like this is ready to go. Any additional comment?

Wed, Mar 24, 4:21 AM · Restricted Project, Restricted Project, debug-info
djtodoro added inline comments to D99238: [DebugInfo] Enable the call site parameter feature by default.
Wed, Mar 24, 12:59 AM · Restricted Project, Restricted Project, debug-info

Tue, Mar 23

djtodoro updated the diff for D82547: [Debugify] Expose original debug info preservation check as CC1 option.
  • addressing comments
Tue, Mar 23, 8:05 AM · Restricted Project, Restricted Project, debug-info
djtodoro added inline comments to D82547: [Debugify] Expose original debug info preservation check as CC1 option.
Tue, Mar 23, 8:04 AM · Restricted Project, Restricted Project, debug-info
djtodoro added a comment to D99160: [X86][FastISEL] Support DW_TAG_call_site_parameter with FastISEL.

Cool -- thanks for working on this!

Tue, Mar 23, 3:50 AM · Restricted Project, Restricted Project, debug-info

Mon, Mar 22

djtodoro added a comment to D82547: [Debugify] Expose original debug info preservation check as CC1 option.

Ping.

Mon, Mar 22, 8:45 AM · Restricted Project, Restricted Project, debug-info

Mar 11 2021

djtodoro updated the diff for D82547: [Debugify] Expose original debug info preservation check as CC1 option.
  • rebase on top of trunk
  • refactor the code
Mar 11 2021, 8:04 AM · Restricted Project, Restricted Project, debug-info
djtodoro committed rG9f41c03f8287: [Debugify][OriginalDIMode] Export the report into JSON file (authored by djtodoro).
[Debugify][OriginalDIMode] Export the report into JSON file
Mar 11 2021, 1:12 AM
djtodoro closed D82546: [Debugify][OriginalDIMode] Export the report into JSON file.
Mar 11 2021, 1:11 AM · Restricted Project, debug-info

Mar 8 2021

djtodoro added a comment to D82546: [Debugify][OriginalDIMode] Export the report into JSON file.

ping :)

Mar 8 2021, 11:40 PM · Restricted Project, debug-info
djtodoro added a comment to D98218: [LSR] fix a issue that LoopStrengthReduction drop debug location unnecessarily.

Please add a test case.

Mar 8 2021, 11:11 PM · Restricted Project

Mar 5 2021

djtodoro updated the diff for D82546: [Debugify][OriginalDIMode] Export the report into JSON file.
  • adjust the test to work on Windows as well
Mar 5 2021, 4:49 AM · Restricted Project, debug-info

Mar 4 2021

djtodoro updated the diff for D82546: [Debugify][OriginalDIMode] Export the report into JSON file.
  • adding a test
Mar 4 2021, 2:11 AM · Restricted Project, debug-info
djtodoro added a reviewer for D82546: [Debugify][OriginalDIMode] Export the report into JSON file: StephenTozer.
Mar 4 2021, 2:08 AM · Restricted Project, debug-info

Mar 3 2021

djtodoro added a comment to D82546: [Debugify][OriginalDIMode] Export the report into JSON file.

@StephenTozer Thanks!

Mar 3 2021, 3:02 AM · Restricted Project, debug-info

Feb 26 2021

djtodoro added a comment to D82547: [Debugify] Expose original debug info preservation check as CC1 option.

Ping :)

Feb 26 2021, 1:09 PM · Restricted Project, Restricted Project, debug-info
djtodoro added a comment to D82546: [Debugify][OriginalDIMode] Export the report into JSON file.

Ping :)

Feb 26 2021, 1:09 PM · Restricted Project, debug-info

Feb 24 2021

djtodoro updated the diff for D82547: [Debugify] Expose original debug info preservation check as CC1 option.
  • Rebase on top of trunk
Feb 24 2021, 12:37 AM · Restricted Project, Restricted Project, debug-info
djtodoro updated the diff for D82546: [Debugify][OriginalDIMode] Export the report into JSON file.
  • Rebase on top of trunk
Feb 24 2021, 12:25 AM · Restricted Project, debug-info

Feb 22 2021

djtodoro committed rG52113451fbee: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats (authored by djtodoro).
[NFC][llvm-dwarfdump] Don't calculate unnecessary stats
Feb 22 2021, 12:32 AM
djtodoro closed D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.
Feb 22 2021, 12:32 AM · Restricted Project, debug-info
djtodoro added a comment to D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.

Thanks!

Feb 22 2021, 12:29 AM · Restricted Project, debug-info

Feb 19 2021

djtodoro added a comment to D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.

@aprantl I guess this is ok now ? :)

Feb 19 2021, 5:39 AM · Restricted Project, debug-info
djtodoro committed rGb6db47d7e044: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc (authored by djtodoro).
[llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc
Feb 19 2021, 5:39 AM
djtodoro closed D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
Feb 19 2021, 5:38 AM · debug-info, Restricted Project
djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

Thanks!

Feb 19 2021, 4:56 AM · debug-info, Restricted Project
djtodoro committed rG0d829802969f: [docs] Fix the GlobalISel/GenericOpcode.rst (authored by djtodoro).
[docs] Fix the GlobalISel/GenericOpcode.rst
Feb 19 2021, 1:32 AM
djtodoro committed rG1a2b3536efef: Reland "[Debugify] Make the debugify aware of the original (-g) Debug Info" (authored by djtodoro).
Reland "[Debugify] Make the debugify aware of the original (-g) Debug Info"
Feb 19 2021, 12:12 AM

Feb 18 2021

djtodoro retitled D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats from [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc to [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.
Feb 18 2021, 3:51 AM · Restricted Project, debug-info
djtodoro added a reverting change for rG8ee7c7e02953: [Debugify] Make the debugify aware of the original (-g) Debug Info: rGc1e23894fcf5: Revert "[Debugify] Make the debugify aware of the original (-g) Debug Info".
Feb 18 2021, 2:05 AM
djtodoro committed rGc1e23894fcf5: Revert "[Debugify] Make the debugify aware of the original (-g) Debug Info" (authored by djtodoro).
Revert "[Debugify] Make the debugify aware of the original (-g) Debug Info"
Feb 18 2021, 2:05 AM
djtodoro added a reverting change for D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info: rGc1e23894fcf5: Revert "[Debugify] Make the debugify aware of the original (-g) Debug Info".
Feb 18 2021, 2:05 AM · debug-info, Restricted Project
djtodoro committed rG8ee7c7e02953: [Debugify] Make the debugify aware of the original (-g) Debug Info (authored by djtodoro).
[Debugify] Make the debugify aware of the original (-g) Debug Info
Feb 18 2021, 1:53 AM
djtodoro closed D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info.
Feb 18 2021, 1:52 AM · debug-info, Restricted Project
djtodoro added a comment to D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.

This definitely won't hurt, but it's a bit inconsistent. The NULL check is inside collectStatsRecursive(), but the CU check is outside of collectStatsForDie(). It would be nice to be consistent and have all functions handle all DIE types with potentially an early exit at the top rather sometimes having the burden to sanitize the input at the call site.

I agree. Thanks.

Feb 18 2021, 12:57 AM · Restricted Project, debug-info
djtodoro updated the diff for D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.
  • Use early exit in both funcs
Feb 18 2021, 12:57 AM · Restricted Project, debug-info

Feb 17 2021

djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

llvm-dwarfdump --statistics already takes a while to examine a stage2reldeb clang binary, it'd be best to avoid allocating more global data than we need.

(Out-of-this-concrete-topic) The D96871 is a small optimization of the llvm-dwarfdump --statistics.

Feb 17 2021, 8:07 AM · debug-info, Restricted Project
djtodoro added a project to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc: debug-info.
Feb 17 2021, 8:04 AM · debug-info, Restricted Project
djtodoro requested review of D96871: [NFC][llvm-dwarfdump] Don't calculate unnecessary stats.
Feb 17 2021, 8:04 AM · Restricted Project, debug-info
djtodoro updated the diff for D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
  • Handle nested nodes (added a test for that)
  • Use llvm::erase_value instead of std::erase-remove idiom
Feb 17 2021, 8:01 AM · debug-info, Restricted Project
djtodoro added inline comments to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
Feb 17 2021, 7:38 AM · debug-info, Restricted Project

Feb 12 2021

djtodoro accepted D96559: Support emitting complex expressions that include entry values.

thanks! Lgtm

Feb 12 2021, 5:11 PM · Restricted Project, debug-info
djtodoro added a comment to D96559: Support emitting complex expressions that include entry values.
In D96559#2561263, @vsk wrote:

It seems reasonable to me to split out AsmPrinter support for complex entry values from the change(s) to start emitting them. @djtodoro any concerns?

I completely agree :) And it is safe.

Feb 12 2021, 4:35 PM · Restricted Project, debug-info
djtodoro added inline comments to D96559: Support emitting complex expressions that include entry values.
Feb 12 2021, 7:56 AM · Restricted Project, debug-info
djtodoro added inline comments to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
Feb 12 2021, 6:43 AM · debug-info, Restricted Project
djtodoro added inline comments to D96559: Support emitting complex expressions that include entry values.
Feb 12 2021, 4:53 AM · Restricted Project, debug-info
djtodoro added inline comments to D96559: Support emitting complex expressions that include entry values.
Feb 12 2021, 4:28 AM · Restricted Project, debug-info
djtodoro added a comment to D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info.

ping :)

Feb 12 2021, 4:27 AM · debug-info, Restricted Project
djtodoro added a comment to D96559: Support emitting complex expressions that include entry values.

This has no effect to llvm/clang, since we support simple register locations as entry values only. D87233 and D87357 introduce complex-entry-values.

Feb 12 2021, 4:25 AM · Restricted Project, debug-info

Feb 11 2021

djtodoro added a comment to D96472: llvm-dwarfdump: fix the counting when printing DW_OP_entry_value.

cool, thanks!

Feb 11 2021, 1:18 AM · Restricted Project, debug-info

Feb 8 2021

djtodoro updated the diff for D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
  • Code refactor
  • Handle the case when a DW_AT_inline copy of subprogram is out of order
    • Add test for that
Feb 8 2021, 3:48 AM · debug-info, Restricted Project
djtodoro committed rG9abd8c1a4c38: [elf-core] Improve reading memory from core file (authored by djtodoro).
[elf-core] Improve reading memory from core file
Feb 8 2021, 12:19 AM
djtodoro closed D93939: [elf-core] Improve reading memory from core file.
Feb 8 2021, 12:19 AM · Restricted Project

Feb 5 2021

djtodoro updated the diff for D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
  • Maintain one array of inlined vars per inlined instance by creating it on the stack
  • Improve the test
Feb 5 2021, 6:53 AM · debug-info, Restricted Project
djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

@jmorse Thanks for the review!

Feb 5 2021, 5:56 AM · debug-info, Restricted Project
djtodoro updated the diff for D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
  • Replace the vector representing inline vars with a map
  • Replace std::vector with SmallVector
  • Improve the test with multiple concrete inlined instacies
Feb 5 2021, 3:35 AM · debug-info, Restricted Project
djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

Thanks for the patch -- do I understand correctly that any coverage of an inlined variable will lead to it being removed from the "InlinedVariables" vector? I'm wondering what happens if we have two inlining sites: one where an inlined variable is optimised out, another where the variable has a location. If we're keeping global data and deleting elements from it when coverage is observed, I think that'll make the output dependent on which the inlining sites are encountered.

If a site without coverage is seen before a site with coverage, it'll get a zero-coverage record from InlinedVariables successfully. But if you flip the order, the site with coverage will erase from InlinedVariables, and the site without coverage won't know about the un-covered variable.

Oh, I've forgotten to replace the vector with a map for concrete inlined instances.

Feb 5 2021, 3:33 AM · debug-info, Restricted Project

Feb 4 2021

djtodoro updated the summary of D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
Feb 4 2021, 8:53 AM · debug-info, Restricted Project
djtodoro added a comment to D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.

Discussed in: https://lists.llvm.org/pipermail/llvm-dev/2021-January/148139.html

Feb 4 2021, 8:42 AM · debug-info, Restricted Project
djtodoro requested review of D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc.
Feb 4 2021, 8:26 AM · debug-info, Restricted Project
djtodoro added a comment to D93939: [elf-core] Improve reading memory from core file.

@labath Thanks for the review! I'll land this tomorrow.

Feb 4 2021, 6:13 AM · Restricted Project

Feb 3 2021

djtodoro added a comment to D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info.

Is this ok now?

Feb 3 2021, 11:58 PM · debug-info, Restricted Project
djtodoro added inline comments to D95990: Remove overzealous verifier check on DW_OP_LLVM_entry_value and improve the documentation.
Feb 3 2021, 11:57 PM · Restricted Project, debug-info
djtodoro added inline comments to D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info.
Feb 3 2021, 1:13 AM · debug-info, Restricted Project
djtodoro accepted D95617: [DWARF] Inlined variables with no location should not have a DW_TAG_variable.
NOTE: I will try to address this in llvm-dwarfdump --stats/locstats as well (asap).
Feb 3 2021, 1:05 AM · Restricted Project

Feb 2 2021

djtodoro updated the diff for D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info.
  • Improving the unit test with positive result of debugify
Feb 2 2021, 3:23 AM · debug-info, Restricted Project
djtodoro added inline comments to D82545: [Debugify] Make the debugify aware of the original (-g) Debug Info.
Feb 2 2021, 3:21 AM · debug-info, Restricted Project

Feb 1 2021

djtodoro updated the diff for D93939: [elf-core] Improve reading memory from core file.
  • Test update
Feb 1 2021, 8:35 AM · Restricted Project
djtodoro added a comment to D93939: [elf-core] Improve reading memory from core file.

Another option would be to ditch disassembling, and check this via memory reads, as that is what you are actually fixing

+1, nice! thanks!

Feb 1 2021, 8:33 AM · Restricted Project