Skip to content

Conversation

@kugan-nv
Copy link
Contributor

Add hierarchical discriminator multiplicity support

Added support for multiplicity and copy_id for gcc gcov. This should matches the GCC
implementation. I am posting patches to GCC to match this.

  * GetBaseDiscriminator() - Extract bits 0-7
  * GetMultiplicity() - Extract bits 8-14 (duplication factor)
  * GetCopyID() - Extract bits 15-25 (unused but reserved)

With the patch we now:
1. Extract multiplicity and copy_id from discriminator
2. Multiply sample count by multiplicity
4. Add samples  using copy_id.

This was already supported for LLVM.

Added support for mutiplicity and copy_id for gcc gcov. This should matches the GCC
implementation. I am posting patches to GCC to match this.

  * GetBaseDiscriminator() - Extract bits 0-7
  * GetMultiplicity() - Extract bits 8-14 (duplication factor)
  * GetCopyID() - Extract bits 15-25 (unused but reserved)

With the patch we now:
1. Extract multiplicity and copy_id from discriminator
2. Multiply sample count by multiplicity
4. Add samples  using copy_id.

This was already supported for LLVM.
Copy link
Contributor

@erozenfeld erozenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question

}

// Return the full 64-bit offset for 32-bit hierarchical discriminators.
static constexpr uint64_t GenerateFullOffset(uint64_t Offset) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not called from anywhere , is it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants