Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nfc][docs]Generalize header description and ascii art for indexed profiles #83507

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

minglotus-6
Copy link
Contributor

  • Add pointers to code for source of truth.
  • Move necessary details from doc to code.

- Add pointers to code for source of truth.
- Move necessary details from doc to code.
@minglotus-6
Copy link
Contributor Author

I think the doc is easier to maintain by removing boilerplates. Otherwise it's painful to update ascii art graph with templated content.

Planned to submit this change before #83309.

| | +-----------------------+ O
| +->| Binary Ids | A
| Byte Offset | A
+------ | of section 2 | D
Copy link
Contributor

Choose a reason for hiding this comment

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

why starting the number from 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Profile summary is regarded as the first payload section and it doesn't need an offset.

I revised the graph to use section A B ... Z, and added a note to mention profile summary.

``HashType``
The hashing scheme for on-disk hash table keys. Only MD5 hashing is used as of
writing.
The `Header struct`_ should be the source of truth. Field names and comments
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably document the sections are A, B, C, and D, and their order is defined in Header struct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Incorporate the section names in the graph above and reworded the paragraph slightly.

For indexed profiles, the byte offset is relative to the start of profile memory buffer. Thereby the field order in the struct definition doesn't need to be the same as the order of payloads in the profile (e.g., if we need it sometime in the future).

@minglotus-6 minglotus-6 changed the title [nfc][docs]Generalize header and ascii art for indexed profiles [nfc][docs]Generalize header description and ascii art for indexed profiles Mar 1, 2024
@minglotus-6
Copy link
Contributor Author

Bump.

@minglotus-6 minglotus-6 merged commit d0b4780 into llvm:main Mar 28, 2024
4 of 5 checks passed
@minglotus-6 minglotus-6 deleted the indexedformat branch March 29, 2024 00:08
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.

None yet

2 participants