This is an archive of the discontinued LLVM Phabricator instance.

[PseudoProbe] Do not force the calliste debug loc to inlined probes from __nodebug__ functions.
ClosedPublic

Authored by hoy on May 26 2023, 8:55 AM.

Details

Summary

For pseudo probes we would like to keep their original dwarf discriminator (either a zero or null) until the first FS-discriminator pass. The inliner is a violation of that, given that it assigns inlinee instructions with no debug info with the that of the callsite. This is being disabled in this patch.

Diff Detail

Event Timeline

hoy created this revision.May 26 2023, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 8:55 AM
hoy requested review of this revision.May 26 2023, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 8:55 AM
hoy edited the summary of this revision. (Show Details)May 26 2023, 8:56 AM
hoy added a reviewer: wenlei.

For pseudo probes we would like to keep their original debug location

Is this accurate? we just don't want to have non-zero discriminator for probes, but we don't really care about whether their debug metadata point to original debug location or not. In this particular case, there's just no need to fill in call debug info if probe from inlinee originally doesn't have debug info.

llvm/lib/Transforms/Utils/InlineFunction.cpp
1645–1646

nit: follow the style above, as we don't want to make a single complicated condition check in the future.

// ...
if (isa<PseudoProbeInst>(BI))
  continue;
hoy added a comment.May 26 2023, 11:23 AM

For pseudo probes we would like to keep their original debug location

Is this accurate? we just don't want to have non-zero discriminator for probes, but we don't really care about whether their debug metadata point to original debug location or not. In this particular case, there's just no need to fill in call debug info if probe from inlinee originally doesn't have debug info.

Yeah, would be more accurate to say "keep their original dwarf discriminator".

hoy updated this revision to Diff 526138.May 26 2023, 11:23 AM
hoy edited the summary of this revision. (Show Details)

Addressing comments.

hoy edited the summary of this revision. (Show Details)May 26 2023, 11:24 AM
wenlei accepted this revision.May 26 2023, 11:58 AM

lgtm, thanks.

This revision is now accepted and ready to land.May 26 2023, 11:58 AM