Comments (4)
From https://github.com/google/autofdo:
--profile: PERF_PROFILE collected using linux perf (with last branch record).
In order to collect this profile, you will need to have an Intel CPU that
have last branch record (LBR) support. You also need to have your linux
kernel configured with LBR support. To profile:
perf record -c PERIOD -e EVENT -b -o perf.data -- ./command
EVENT is refering to BR_INST_RETIRED:TAKEN if available. For some
architectures, BR_INST_EXEC:TAKEN also works.
You will need to collect perf profile with "-b" option, not --call-graph.
Additionally, make sure that --binary is pointing to a binary with debug
info.
Dehao
On Tue, Apr 21, 2015 at 4:14 AM, Ilya Palachev [email protected]
wrote:
https://gcc.gnu.org/ml/gcc/2015-04/msg00174.html
https://gcc.gnu.org/ml/gcc/2015-04/msg00249.htmlDoes anybody know with which options should the perf be executed so that
to collect appropriate data for the autofdo converter?
I obtain the same data for different programs, and it seems to be empty
(1600 Bytes).
They have the same md5sum for different programs:Data for simple program with 30 lines of code:
$ md5sum ytest.gcov
d85481c9154aa606ce4893b64fe109e7 ytest.gcovData for program of 3D Delaunay triangulation construction of
1000000 points.
$ md5sum experimentCGAL_convexHullDynamic.gcov
d85481c9154aa606ce4893b64fe109e7 experimentCGAL_convexHullDynamic.gcovWe tried to collect perf data using option --call-graph fp but it does not
help: the output gcov data is still the same.
Sometimes create_gcov reports the following error:
E0421 13:10:37.125629 8732 perf_parser.cc:209] Mapped 50% of samples,
expected at least 95%But it does not mean that there are not enough samples collected in the
profile, because 99% of samples are mapped in the case of very simple
program (with 1 function).
I try to find working case for more than a week but did not suceeded.Can anybody show me that create_gcov works at least for one case?
—
Reply to this email directly or view it on GitHub
#15.
from autofdo.
Thanks! Diego also answered me that: https://gcc.gnu.org/ml/gcc/2015-04/msg00250.html
from autofdo.
I am trying to covert captured perf data to gcc format.But always 1600 bytes are dumped.
Machine where I captured perf data is having LBR support.
perf record -o /tmp//perf.data -b -e cpu/event=0xc4,umask=0x20,name=br_inst_retired_near_taken,period=400009/pp -p 11045 -F 10 -- sleep 900
Then I used following command to create gcov data
create_gcov --binary= --profile=perf.data --gcov=perf-prod.afdo --profiler=perf -log_dir=. -gcov_version=1
Binary is unstripped and have debug symbols
In log following
Log file created at: 2019/05/10 12:04:54
Running on machine: a107-2-2-3
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
W0510 12:04:54.359030 5412 module_grouper.cc:60] Cannot read compilation info from binary. Please use -frecord-compilation-info-in-elf when building the binary
I0510 12:04:55.822785 5412 perf_reader.cc:798] Number of events stored: 1164694
I0510 12:05:03.224366 5412 perf_parser.cc:256] Parser processed: 1066560 MMAP/MMAP2 events, 405 COMM events, 0 FORK events, 0 EXIT events, 90695 SAMPLE events, 73020 of these were mapped
There is no other information.I tried many combinations but it is not working.What could be the issue?
from autofdo.
Cannot read compilation info from binary. Please use -frecord-compilation-info-in-elf when building the binary
To use this gcc has this option:
-frecord-gcc-switches
e.g.,
gcc -O3 test_sort.c -o sort -frecord-gcc-switches -g
from autofdo.
Related Issues (20)
- autofdo doesnt compile. HOT 6
- dwarf2reader.cc:835: Unhandled form type HOT 2
- Huge memory consumption
- couldn't ninja HOT 2
- Disscussion: Does autofdo support .zdebug_{info,line}...
- llvm-16-compile-fix
- Apply PGO to the AutoFDO itself HOT 3
- [bug] No checking about "requires the first loadable segment to be executable". HOT 5
- Don't emit in output profile when sample count is 0. HOT 2
- excessive total_count HOT 1
- sample_reader.cc:102] Error reading from perf_inject_etm_test_loop.data&profile_creator.cc:138] Error reading profile.
- Please allow using system abseil (over bundled abseil)
- Completely broken, will not compile on Clear Linux or other distros I've tried HOT 22
- autofdo needs libprotofbuf-dev
- AutoFDO can not be built with LLVM trunk (LLVM-18)
- Optimization clang with Propeller: create_llvm_prof fails
- Propeller slows down clang ~20% HOT 4
- When support path cloning in propeller
- Build autofdo tool failed for llvm-master HOT 1
- create_gcov can not find binary with buildid and profile_creator can not read profile HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autofdo.