History log of /llvm-project/bolt/tools/merge-fdata/merge-fdata.cpp (Results 1 – 25 of 28)
Revision Date Author Comments
# 86526084 15-Dec-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Fix counts aggregation in merge-fdata (#119652)

merge-fdata used to consider misprediction count as part of "signature",
or the aggregation key. This prevented it from collapsing profile lin

[BOLT] Fix counts aggregation in merge-fdata (#119652)

merge-fdata used to consider misprediction count as part of "signature",
or the aggregation key. This prevented it from collapsing profile lines
with different misprediction counts, which resulted in duplicate
`(from, to)` pairs with different misprediction and execution counts.

Fix that by splitting out misprediction count and accumulating it
separately.

Test Plan: updated bolt/test/merge-fdata-lbr-mode.test

show more ...


# 97f43364 15-Dec-2024 Amir Ayupov <aaupov@fb.com>

[BOLT][NFC] Speedup merge-fdata (#119942)

Eliminate splitting the buffer into lines, and use `std::getline`
directly. Simplify no_lbr and boltedcollection handling as well.

Test Plan: For a larg

[BOLT][NFC] Speedup merge-fdata (#119942)

Eliminate splitting the buffer into lines, and use `std::getline`
directly. Simplify no_lbr and boltedcollection handling as well.

Test Plan: For a large fdata file (200MB), fstream version is ~10%
faster.

show more ...


# 5225f1b4 13-Dec-2024 Tibor Dusnoki <tdusnoki@inf.u-szeged.hu>

[BOLT][merge-fdata] Fix basic sample profile aggregation without LBR info (#118481)

When a basic sample profile is gathered without LBR info, the generated
profile contains a "no-lbr" tag in the fi

[BOLT][merge-fdata] Fix basic sample profile aggregation without LBR info (#118481)

When a basic sample profile is gathered without LBR info, the generated
profile contains a "no-lbr" tag in the first line of the fdata file.
This PR fixes merge-fdata to recognize and save this tag to the output
file.

show more ...


# 6fb39ac7 25-Sep-2024 Maksim Panchenko <maks@fb.com>

[BOLT][merge-fdata] Initialize YAML profile header (#109613)

While merging profiles, some fields in the input header, e.g.
HashFunction, could be uninitialized leading to a UMR. Initialize merged

[BOLT][merge-fdata] Initialize YAML profile header (#109613)

While merging profiles, some fields in the input header, e.g.
HashFunction, could be uninitialized leading to a UMR. Initialize merged
header with the first input header.

Fixes #109592

show more ...


# 15fa3ba5 03-Sep-2024 Amir Ayupov <aaupov@fb.com>

[BOLT][YAML] Allow unknown keys in the input (#100824)

This ensures forward compatibility, where old BOLT versions can consume
the profile created by newer versions with extra keys.

Test Plan: a

[BOLT][YAML] Allow unknown keys in the input (#100824)

This ensures forward compatibility, where old BOLT versions can consume
the profile created by newer versions with extra keys.

Test Plan: added yaml-unknown-keys.test

show more ...


# 716042a6 06-Mar-2024 Mehdi Amini <joker.eph@gmail.com>

Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (#83702)

The base class llvm::ThreadPoolInterface will be renamed
llvm::ThreadPool in a subsequent commit.

This is a breaking change: cli

Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (#83702)

The base class llvm::ThreadPoolInterface will be renamed
llvm::ThreadPool in a subsequent commit.

This is a breaking change: clients who use to create a ThreadPool must
now create a DefaultThreadPool instead.

show more ...


# 744616b3 20-Feb-2024 Mehdi Amini <joker.eph@gmail.com>

Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (#82296)

This is addressing a long-time TODO to rename this misleading API. The
old one is preserved for now but marked deprecat

Rename `ThreadPool::getThreadCount()` to `getMaxConcurrency()` (NFC) (#82296)

This is addressing a long-time TODO to rename this misleading API. The
old one is preserved for now but marked deprecated.

show more ...


# 6735ce9d 19-Jan-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)

Fix the bug where merge-fdata unconditionally outputs boltedcollection
line, regardless of whether input files have it set

[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)

Fix the bug where merge-fdata unconditionally outputs boltedcollection
line, regardless of whether input files have it set.

Test Plan:
Added bolt/test/X86/merge-fdata-nobat-mode.test which fails without this
fix.

show more ...


# 9fec33aa 19-Jan-2024 Amir Ayupov <aaupov@fb.com>

Revert "[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)"

This reverts commit 82bc33ea3f1a539be50ed46919dc53fc6b685da9.

Accidentally pushed unrelated changes.


# 82bc33ea 19-Jan-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)

Fix the bug where merge-fdata unconditionally outputs boltedcollection
line, regardless of whether input files have it s

[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)

Fix the bug where merge-fdata unconditionally outputs boltedcollection
line, regardless of whether input files have it set.

Test Plan:
Added bolt/test/X86/merge-fdata-nobat-mode.test which fails without this
fix.

show more ...


# ad8fd5b1 14-Dec-2023 Kazu Hirata <kazu@google.com>

[BOLT] Use StringRef::{starts,ends}_with (NFC)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,end

[BOLT] Use StringRef::{starts,ends}_with (NFC)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.

show more ...


# 67cf01bd 19-May-2023 Yi Kong <yikong@google.com>

Reland^2 "[BOLT] Parallelize legacy profile merging"

Resovled the issue that when number of tasks is fewer than cores, we end
up creating as many threads as the number of cores, making the
performan

Reland^2 "[BOLT] Parallelize legacy profile merging"

Resovled the issue that when number of tasks is fewer than cores, we end
up creating as many threads as the number of cores, making the
performance worse than the single thread version.

show more ...


# 65404e51 18-May-2023 Yi Kong <yikong@google.com>

Revert "Reland "[BOLT] Parallelize legacy profile merging""

This reverts commit 611fb179b19857ffb87df81c926902fc7e3412ab.

Broken tests


# 611fb179 28-Apr-2023 Yi Kong <yikong@google.com>

Reland "[BOLT] Parallelize legacy profile merging"

This reverts commit 78d8d016490909ac759c6f76c5f8679bc7a58b2e.


# 78d8d016 28-Apr-2023 Yi Kong <yikong@google.com>

Revert "[BOLT] Parallelize legacy profile merging"

This reverts commit 35af20d9e036deeed250b73fd3ae86d6455173c5.

The patch caused a test failure.


# 35af20d9 31-Mar-2023 Yi Kong <yikong@google.com>

[BOLT] Parallelize legacy profile merging

Merging profiles is quite expensive, but easily paralleizable.

8359 profiles on n2d-standard-128:
single-thread: 808s
multi-thread: 200s (~75% speed up)

D

[BOLT] Parallelize legacy profile merging

Merging profiles is quite expensive, but easily paralleizable.

8359 profiles on n2d-standard-128:
single-thread: 808s
multi-thread: 200s (~75% speed up)

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

show more ...


# d788db3d 31-Mar-2023 Yi Kong <yikong@google.com>

[BOLT][NFC] Simplify code using std::optional

Use std::optional instead of tracking if it is the first profile seen.

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


# 72e5b14f 02-Feb-2023 Amir Ayupov <aaupov@fb.com>

[BOLT][NFC] Use llvm::make_second_range

Reviewed By: #bolt, rafauler

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


# d2c87699 24-Jun-2022 Amir Ayupov <aaupov@fb.com>

[BOLT][NFC] Use range-based STL wrappers

Replace `std::` algorithms taking begin/end iterators with `llvm::` counterparts
accepting ranges.

Reviewed By: rafauler

Differential Revision: https://rev

[BOLT][NFC] Use range-based STL wrappers

Replace `std::` algorithms taking begin/end iterators with `llvm::` counterparts
accepting ranges.

Reviewed By: rafauler

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

show more ...


# 716d428a 01-Jun-2022 Yi Kong <yikong@google.com>

[BOLT] Add `-o` option to merge-fdata

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


# 2a42f7f7 31-May-2022 Yi Kong <yikong@google.com>

[BOLT] Allow merge-fdata to take a directory as input

and recursively merge all files under said directory. This is similar
to `llvm-profdata merge`.

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

[BOLT] Allow merge-fdata to take a directory as input

and recursively merge all files under said directory. This is similar
to `llvm-profdata merge`.

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

show more ...


# 97715104 31-May-2022 Yi Kong <yikong@google.com>

[BOLT][NFC] Don't over-specify the size of SmallVector

This is the recommended way, should make merging profiles ever so
slightly faster.


# 2fdc5d33 13-May-2022 Rafael Auler <rafaelauler@fb.com>

[BOLT] Fix merge-fdata handling of BAT profiles

When a profile is collected in a BOLTed binary, the generated
profile is tagged with a header string "boltedcollection" in the first
line of the fdata

[BOLT] Fix merge-fdata handling of BAT profiles

When a profile is collected in a BOLTed binary, the generated
profile is tagged with a header string "boltedcollection" in the first
line of the fdata file. Fix merge-fdata to recognize this header
string and preserve it into the output.

Reviewed By: Amir

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

show more ...


# 7d7771f3 11-Apr-2022 Yi Kong <yikong@google.com>

[BOLT] Compact legacy profiles

Merging multiple legacy profiles (produced by instrumentation BOLT) can
easily reach GiBs. Let merge-fdata compact the profiles during merge to
significantly reduce sp

[BOLT] Compact legacy profiles

Merging multiple legacy profiles (produced by instrumentation BOLT) can
easily reach GiBs. Let merge-fdata compact the profiles during merge to
significantly reduce space usage.

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

show more ...


# 883bf0e8 29-Dec-2021 Amir Ayupov <aaupov@fb.com>

[BOLT][NFC] Fix braces usage in the rest of the codebase

Summary:
Refactor remaining bolt sources to follow the braces rule for if/else/loop from
[LLVM Coding Standards](https://llvm.org/docs/Coding

[BOLT][NFC] Fix braces usage in the rest of the codebase

Summary:
Refactor remaining bolt sources to follow the braces rule for if/else/loop from
[LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html).

(cherry picked from FBD33345885)

show more ...


12