-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for including GNU Gold linker along with --section-orderi…
…ng-file GNU Gold linker will be auto-detected on Linux systems. If available the pre-generated section ordering file will be used while linking the node binary. This will help improve performance through reduction of iTLB misses as the most frequently used functions in the runtime will be packed together. Add documentation to generate the section reorderding file Add an option to override this configure option if LD environment variable is defined.
- Loading branch information
Showing
4 changed files
with
4,799 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Once the workload, production server has reached a steady state/ post warm-up phase | ||
|
||
- [] Collect the perf profile for the workload: | ||
``` | ||
perf record -ag -e cycles:pp -o <perf_profile_cycles_pp> -- sleep 30 | ||
``` | ||
`:pp` offers a more precise dist of cycles accounting | ||
|
||
- [] Use perf script command to decode the collected profile | ||
``` | ||
perf script -i perf_profile_inst -f comm,ip -c node | gzip -c > perf_profile_decoded.pds.gz | ||
``` | ||
- [] Use nm to dump the binary's symbol information | ||
``` | ||
nm -S node > node.nm | ||
``` | ||
- [] Run the hfsort program to determine the function ordering | ||
for the node binary ideal for this workload. | ||
https://github.com/facebook/hhvm/tree/master/hphp/tools/hfsort | ||
``` | ||
Usage: hfsort [-p] [-e <EDGCNT_FILE>] <SYMBOL_FILE> <PERF_DATA_FILE> | ||
-p, use pettis-hansen algorithm for code layout (optional) | ||
-e <EDGCNT_FILE>, use edge profile result to build the call graph | ||
hfsort -p node.nm perf_profile_decoded.pds.gz | ||
``` | ||
This application will create 2 files hotfuncs.txt and result-hfsort.txt | ||
|
||
hotfuncs.txt is what is used here. hfsort is one way to generate it. | ||
hfsort generates the minimal working order set required to optimally run the program. |
Oops, something went wrong.