History log of /llvm-project/llvm/tools/llvm-profdata/llvm-profdata.cpp (Results 126 – 150 of 321)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c9baa560 26-Jan-2022 Ellis Hoag <ellis.sparky.hoag@gmail.com>

[InstrProf][Correlate] Verify debug info with llvm-profdata show

Use the `llvm-profdata show` command to verify debug info for profile correlation using the `--debug-info` option.

Reviewed By: kyul

[InstrProf][Correlate] Verify debug info with llvm-profdata show

Use the `llvm-profdata show` command to verify debug info for profile correlation using the `--debug-info` option.

Reviewed By: kyulee

Differential Revision: https://reviews.llvm.org/D118181

show more ...


# 91337e90 18-Jan-2022 Chris Bieneman <chris.bieneman@me.com>

Handle whitespace in symbol list

Trimming whitespace or carriage returns from symbols allows this code
to work on Windows and makes it match other places symbol lists are
handled.

Reviewed By: Mask

Handle whitespace in symbol list

Trimming whitespace or carriage returns from symbols allows this code
to work on Windows and makes it match other places symbol lists are
handled.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D117570

show more ...


# f44473ec 08-Jan-2022 Kazu Hirata <kazu@google.com>

[llvm] Remove redundant member initialization (NFC)

Identified with readability-redundant-member-init.


# e5947760 03-Jan-2022 Kazu Hirata <kazu@google.com>

Revert "[llvm] Remove redundant member initialization (NFC)"

This reverts commit fd4808887ee47f3ec8a030e9211169ef4fb094c3.

This patch causes gcc to issue a lot of warnings like:

warning: base cl

Revert "[llvm] Remove redundant member initialization (NFC)"

This reverts commit fd4808887ee47f3ec8a030e9211169ef4fb094c3.

This patch causes gcc to issue a lot of warnings like:

warning: base class ‘class llvm::MCParsedAsmOperand’ should be
explicitly initialized in the copy constructor [-Wextra]

show more ...


# fd480888 02-Jan-2022 Kazu Hirata <kazu@google.com>

[llvm] Remove redundant member initialization (NFC)

Identified with readability-redundant-member-init.


# 4ecf15b7 29-Dec-2021 Kyungwoo Lee <kyulee@fb.com>

[llvm-profdata] Make -debug-info visible

Add the option comment in .rst.

Reviewed By: ellis

Differential Revision: https://reviews.llvm.org/D116348


# 65d7fd02 16-Dec-2021 Ellis Hoag <ellis.sparky.hoag@gmail.com>

[Try2][InstrProf] Add Correlator class to read debug info

Extend `llvm-profdata` to read in a `.proflite` file and also a debug info file to generate a normal `.profdata` profile. This reduces the b

[Try2][InstrProf] Add Correlator class to read debug info

Extend `llvm-profdata` to read in a `.proflite` file and also a debug info file to generate a normal `.profdata` profile. This reduces the binary size by 8.4% when building an instrumented Clang binary without value profiling (164 MB vs 179 MB).

This work is part of the "lightweight instrumentation" RFC: https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4

This was first landed in https://reviews.llvm.org/D114566 but had to be reverted due to build errors.

Reviewed By: kyulee

Differential Revision: https://reviews.llvm.org/D115915

show more ...


# bdc68ee7 17-Dec-2021 Ellis Hoag <ellis.sparky.hoag@gmail.com>

Revert "[InstrProf] Add Correlator class to read debug info"

Also reverts an attempt to fix the build errors https://reviews.llvm.org/D115911

The original diff https://reviews.llvm.org/D114566 caus

Revert "[InstrProf] Add Correlator class to read debug info"

Also reverts an attempt to fix the build errors https://reviews.llvm.org/D115911

The original diff https://reviews.llvm.org/D114566 causes some build
errors that I need to investigate.

https://lab.llvm.org/buildbot/#/builders/118/builds/7037

This reverts commit 95946d2f8589b5450d8f9a9e9b4f7adf44386f8b.

Reviewed By: kyulee

Differential Revision: https://reviews.llvm.org/D115913

show more ...


# 95946d2f 16-Dec-2021 Ellis Hoag <ellis.sparky.hoag@gmail.com>

[InstrProf] Add Correlator class to read debug info

Extend `llvm-profdata` to read in a `.proflite` file and also a debug info file to generate a normal `.profdata` profile. This reduces the binary

[InstrProf] Add Correlator class to read debug info

Extend `llvm-profdata` to read in a `.proflite` file and also a debug info file to generate a normal `.profdata` profile. This reduces the binary size by 8.4% when building an instrumented Clang binary without value profiling (164 MB vs 179 MB).

This work is part of the "lightweight instrumentation" RFC: https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4

Reviewed By: kyulee

Differential Revision: https://reviews.llvm.org/D114566

show more ...


# 5740bb80 14-Dec-2021 Hongtao Yu <hoy@fb.com>

[CSSPGO] Use nested context-sensitive profile.

CSSPGO currently employs a flat profile format for context-sensitive profiles. Such a flat profile allows for precisely manipulating contexts that is e

[CSSPGO] Use nested context-sensitive profile.

CSSPGO currently employs a flat profile format for context-sensitive profiles. Such a flat profile allows for precisely manipulating contexts that is either inlined or not inlined. This is a benefit over the nested profile format used by non-CS AutoFDO. A downside of this is the longer build time due to parsing the indexing the full CS contexts.

For a CS flat profile, though only the context profiles relevant to a module are loaded when that module is compiled, the cost to figure out what profiles are relevant is noticeably high when there're many contexts, since the sample reader will need to scan all context strings anyway. On the contrary, a nested function profile has its related inline subcontexts isolated from other unrelated contexts. Therefore when compiling a set of functions, unrelated contexts will never need to be scanned.

In this change we are exploring using nested profile format for CSSPGO. This is expected to work based on an assumption that with a preinliner-computed profile all contexts are precomputed and expected to be inlined by the compiler. Contexts not expected to be inlined will be cut off and returned to corresponding base profiles (for top-level outlined functions). This naturally forms a nested profile where all nested contexts are expected to be inlined. The compiler will less likely optimize on derived contexts that are not precomputed.

A CS-nested profile will look exactly the same with regular nested profile except that each nested profile can come with an attributes. With pseudo probes, a nested profile shown as below can also have a CFG checksum.

```

main:1968679:12
2: 24
3: 28 _Z5funcAi:18
3.1: 28 _Z5funcBi:30
3: _Z5funcAi:1467398
0: 10
1: 10 _Z8funcLeafi:11
3: 24
1: _Z8funcLeafi:1467299
0: 6
1: 6
3: 287884
4: 287864 _Z3fibi:315608
15: 23
!CFGChecksum: 138828622701
!Attributes: 2
!CFGChecksum: 281479271677951
!Attributes: 2
```

Specific work included in this change:
- A recursive profile converter to convert CS flat profile to nested profile.
- Extend function checksum and attribute metadata to be stored in nested way for text profile and extbinary profile.
- Unifiy sample loader inliner path for CS and preinlined nested profile.
- Changes in the sample loader to support probe-based nested profile.

I've seen promising results regarding build time. A nested profile can result in a 20% shorter build time than a CS flat profile while keep an on-par performance. This is with -duplicate-contexts-into-base=1.

Test Plan:

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D115205

show more ...


Revision tags: llvmorg-13.0.1-rc1
# 7cca33b4 19-Nov-2021 Snehasish Kumar <snehasishk@google.com>

[memprof] Extend llvm-profdata to display MemProf profile summaries.

This commit adds initial support to llvm-profdata to read and print
summaries of raw memprof profiles.
Summary of changes:
* Refa

[memprof] Extend llvm-profdata to display MemProf profile summaries.

This commit adds initial support to llvm-profdata to read and print
summaries of raw memprof profiles.
Summary of changes:
* Refactor shared defs to MemProfData.inc
* Extend show_main to display memprof profile summaries.
* Add a simple raw memprof profile reader.
* Add a couple of tests to tools/llvm-profdata.

Differential Revision: https://reviews.llvm.org/D114286

show more ...


# 259e4c56 27-Oct-2021 Hongtao Yu <hoy@fb.com>

[CSSPGO] Trim cold base profiles for the CS preinliner.

Adding support to the CS preinliner to trim cold base profiles. This makes trimming consistent with the inline decision made by the preinliner

[CSSPGO] Trim cold base profiles for the CS preinliner.

Adding support to the CS preinliner to trim cold base profiles. This makes trimming consistent with the inline decision made by the preinliner. Also disable the existing profile merger when preinliner is on unless explicitly specified.

Reviewed By: wenlei, wlei

Differential Revision: https://reviews.llvm.org/D112489

show more ...


# 4e3eebc6 23-Oct-2021 Kazu Hirata <kazu@google.com>

[tools, utils] Use StringRef::contains (NFC)


# 9978e0e4 08-Oct-2021 Wenlei He <wenlei@fb.com>

[llvm-profdata] Allow overlap/similarity comparison to use custom hot threshold cutoff

Allow overlap/similarity comparison to use custom hot threshold cutoff, instead of using hard coded 990000 as h

[llvm-profdata] Allow overlap/similarity comparison to use custom hot threshold cutoff

Allow overlap/similarity comparison to use custom hot threshold cutoff, instead of using hard coded 990000 as hot cutoff.

Differential Revision: https://reviews.llvm.org/D111385

show more ...


# ce6ed64a 24-Sep-2021 modimo <modimo@fb.com>

[llvm-profdata] Extend support of --topn to sample profiles

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D110449


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3
# 4ef88031 01-Sep-2021 Wenlei He <aktoon@gmail.com>

[llvm-profdata] Fix assertion from invalid iterator

Differential Revision: https://reviews.llvm.org/D109096


Revision tags: llvmorg-13.0.0-rc2
# b9db7036 25-Aug-2021 Hongtao Yu <hoy@fb.com>

[CSSPGO] Split context string to deduplicate function name used in the context.

Currently context strings contain a lot of duplicated function names and that significantly increase the profile size.

[CSSPGO] Split context string to deduplicate function name used in the context.

Currently context strings contain a lot of duplicated function names and that significantly increase the profile size. This change split the context into a series of {name, offset, discriminator} tuples so function names used in the context can be replaced by the index into the name table and that significantly reduce the size consumed by context.

A follow-up improvement made in the compiler and profiling tools is to avoid reconstructing full context strings which is time- and memory- consuming. Instead a context vector of `StringRef` is adopted to represent the full context in all scenarios. As a result, the previous prevalent profile map which was implemented as a `StringRef` is now engineered as an unordered map keyed by `SampleContext`. `SampleContext` is reshaped to using an `ArrayRef` to represent a full context for CS profile. For non-CS profile, it falls back to use `StringRef` to represent a contextless function name. Both the `ArrayRef` and `StringRef` objects are underpinned by real array and string objects that are stored in producer buffers. For compiler, they are maintained by the sample reader. For llvm-profgen, they are maintained in `ProfiledBinary` and `ProfileGenerator`. Full context strings can be generated only in those cases of debugging and printing.

When it comes to profile format, nothing has changed to the text format, though internally CS context is implemented as a vector. Extbinary format is only changed for CS profile, with an additional `SecCSNameTable` section which stores all full contexts logically in the form of `vector<int>`, which each element as an offset points to `SecNameTable`. All occurrences of contexts elsewhere are redirected to using the offset of `SecCSNameTable`.

Testing
This is no-diff change in terms of code quality and profile content (for text profile).

For our internal large service (aka ads), the profile generation is cut to half, with a 20x smaller string-based extbinary format generated.

The compile time of ads is dropped by 25%.

Differential Revision: https://reviews.llvm.org/D107299

show more ...


Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1
# e50a3884 06-May-2021 Gulfem Savrun Yeniceri <gulfem@google.com>

[profile] Add binary id into profiles

This patch adds binary id into profiles to easily associate binaries
with the corresponding profiles. There is an RFC that discusses
the motivation, design and

[profile] Add binary id into profiles

This patch adds binary id into profiles to easily associate binaries
with the corresponding profiles. There is an RFC that discusses
the motivation, design and implementation in more detail:
https://lists.llvm.org/pipermail/llvm-dev/2021-June/151154.html

Differential Revision: https://reviews.llvm.org/D102039

show more ...


# fd895bc8 21-Jul-2021 Gulfem Savrun Yeniceri <gulfem@google.com>

Revert "[profile] Add binary id into profiles"

Revert "[profile] Change linkage type of a compiler-rt func"
This reverts commits f984ac2715f71c38a7872fa2c2ad535b3d4fa285 and
467c7191249b76abff33853b

Revert "[profile] Add binary id into profiles"

Revert "[profile] Change linkage type of a compiler-rt func"
This reverts commits f984ac2715f71c38a7872fa2c2ad535b3d4fa285 and
467c7191249b76abff33853b1692a77f327c2422 because it broke some builds.

show more ...


# f984ac27 06-May-2021 Gulfem Savrun Yeniceri <gulfem@google.com>

[profile] Add binary id into profiles

This patch adds binary id into profiles to easily associate binaries
with the corresponding profiles. There is an RFC that discusses
the motivation, design and

[profile] Add binary id into profiles

This patch adds binary id into profiles to easily associate binaries
with the corresponding profiles. There is an RFC that discusses
the motivation, design and implementation in more detail:
https://lists.llvm.org/pipermail/llvm-dev/2021-June/151154.html

Differential Revision: https://reviews.llvm.org/D102039

show more ...


# ea23c38d 21-Jun-2021 Fangrui Song <i@maskray.me>

[llvm-profdata] Allow omission of -o for --text output

This makes it more convenient to get a text format profile.

Add an error for printing non-text format output to a terminal for instrumentation

[llvm-profdata] Allow omission of -o for --text output

This makes it more convenient to get a text format profile.

Add an error for printing non-text format output to a terminal for instrumentation profile.
(It cannot be portably tested. For sample profile, raw_fd_ostream is hidden deeply so it's inconvenient to add a diagnostic.)

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D104600

show more ...


# 8ea2a58a 19-Jun-2021 Fangrui Song <i@maskray.me>

[llvm-profdata] Make diagnostics consistent with the (no capitalization, no period) style

The format is currently inconsistent. Use the https://llvm.org/docs/CodingStandards.html#error-and-warning-m

[llvm-profdata] Make diagnostics consistent with the (no capitalization, no period) style

The format is currently inconsistent. Use the https://llvm.org/docs/CodingStandards.html#error-and-warning-messages style.

And add `error:` or `warning:` to CHECK lines wherever appropriate.

show more ...


# 0f558db7 19-Jun-2021 Fangrui Song <i@maskray.me>

[llvm-profdata] Delete unneeded empty output filename check


# 59d90fe8 19-Jun-2021 Fangrui Song <i@maskray.me>

Simplify some typedef struct


# 863184dd 11-Jun-2021 wlei <wlei@fb.com>

[CSSPGO] Aggregation by the last K context frames for cold profiles

This change provides the option to merge and aggregate cold context by the last k frames instead of context-less name. By default

[CSSPGO] Aggregation by the last K context frames for cold profiles

This change provides the option to merge and aggregate cold context by the last k frames instead of context-less name. By default K = 1 means the context-less one.

This is for better perf tuning. The more selective merging and trimming will rely on llvm-profgen's preinliner.

Reviewed By: wenlei, hoy

Differential Revision: https://reviews.llvm.org/D104131

show more ...


12345678910>>...13