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

*: Build TiDB with PGO #58630

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5d091fe
init
crazycs520 Dec 30, 2024
5405252
makefile
crazycs520 Dec 30, 2024
bb45d84
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Dec 31, 2024
fa1cb8f
address comment
crazycs520 Jan 2, 2025
ad31bda
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 2, 2025
0765a0c
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 3, 2025
4e7b01f
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 4, 2025
6c090db
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 6, 2025
66229d1
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 6, 2025
7506e8a
fix plugin
crazycs520 Jan 7, 2025
b42b50c
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 7, 2025
0f75f51
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 10, 2025
e8165c0
fix ci
crazycs520 Jan 10, 2025
1949df7
add comment
crazycs520 Jan 10, 2025
6be639a
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 10, 2025
6812abf
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 13, 2025
f481c60
update default.pgo
crazycs520 Jan 13, 2025
6609cb8
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 13, 2025
5232a3a
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 14, 2025
9cf548a
update default.pgo
crazycs520 Jan 15, 2025
3286165
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 15, 2025
3d3bd9a
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 16, 2025
ab5fdbb
update profile
crazycs520 Jan 16, 2025
bda6a1a
add make pgo-file in Makefile
crazycs520 Jan 16, 2025
a024be5
update comment
crazycs520 Jan 17, 2025
a0fa0a9
add readme
crazycs520 Jan 20, 2025
12828a6
add build flag in makefile
crazycs520 Jan 20, 2025
3c3eaef
refine
crazycs520 Jan 20, 2025
61e7387
fix ci
crazycs520 Jan 20, 2025
71026e6
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 20, 2025
483ee98
refine
crazycs520 Jan 20, 2025
2264f2f
refine
crazycs520 Jan 22, 2025
5b0cf08
refine
crazycs520 Jan 22, 2025
1735708
fix ci
crazycs520 Jan 22, 2025
6cadfa6
refine
crazycs520 Jan 22, 2025
9b8577d
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 23, 2025
168cc68
address comment
crazycs520 Jan 24, 2025
19402ed
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 24, 2025
fcff570
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Jan 27, 2025
497fcd1
update client-go
crazycs520 Jan 27, 2025
e9d6bf4
make bazel_prepare
crazycs520 Jan 27, 2025
7528487
Merge branch 'master' of https://github.com/pingcap/tidb into pgo-rea…
crazycs520 Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin
export PATH := $(path_to_add):$(PATH)

GO := GO111MODULE=on go
BUILD_FLAG := -tags codes
BUILD_FLAG := -pgo=default.pgo -tags codes
crazycs520 marked this conversation as resolved.
Show resolved Hide resolved
GOEXPERIMENT=
ifeq ("${ENABLE_FIPS}", "1")
BUILD_FLAG = -tags codes,boringcrypto
Expand Down
Binary file added default.pgo
crazycs520 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this file will be generated by make, is it necessary to include it in git? IMO, we only need to keep either default.pgo or build/profile/*.proto.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@crazycs520 Better to also add some introduction for the choice of default.pgo like how it is generated and why it is chosen as default, which options are recommonded in different scenarios.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

default.pgo need to keep since the build plugin will use it, otherwise I may need to change other ci/build yaml of plugin.

as build/profile/*.proto files, I also want to keep it, since one look at this folder will tell us which CPU profiles default.pgo is currently using.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I write a test about git with large binary file, from the following test result, It wasn't really appropriate to put the profile files inside the git repo, so I've deleted them.

Modified binary file, iteration 1, size: 1 MB, dir_size: 1 MB, git cost: 2.901416ms
Modified binary file, iteration 2, size: 1 MB, dir_size: 2 MB, git cost: 1.016208ms
Modified binary file, iteration 3, size: 1 MB, dir_size: 3 MB, git cost: 1.069875ms
...
Modified binary file, iteration 1000, size: 1 MB, dir_size: 1001 MB, git cost: 35.69275ms

Binary file not shown.