google / google/autofdo

Cannot generate gcov data with `create_gcov`

Open
#196 21 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
619
Forks
127
PR merge metrics
No merged PRs in 30d

Description

Hi,

I've been profiling QEMU and would like to use autofdo to generate a gcov file to test some PGO scenarios. I'm currently in Ubuntu Noble 24.04 with autofdo 0.19-3 installed, and after generating a sizeable profile (around 800 Mb) with the following command:

```
sudo perf record \
-e br_inst_retired.near_taken \
--branch-any \
-p "${qemupid}" \
--all-cpus \
-F 99 \
--output="${perfoutput}" \
--call-graph fp &
```

I'm now attempting to convert it to gcov by invoking:

```
sudo create_gcov -profiler perf -profile perf-hello-1.data -gcov perf-hello-1.gcov -gcov_version 2 -binary /usr/bin/qemu-system-riscv64 -use_lbr 0
```

What I get is the following:

```
E20240628 22:18:15.648012 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648159 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648185 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648203 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648221 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648238 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648255 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648276 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648315 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648331 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648344 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648360 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648375 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648392 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648408 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648427 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648443 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648459 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648473 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648485 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648496 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648509 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648521 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648538 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648556 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648572 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648589 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648607 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648624 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648641 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648658 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.648674 382826 perf_serializer.cc:234] Unknown event type: 18
E20240628 22:18:15.648692 382826 perf_serializer.cc:234] Unknown event type: 17
E20240628 22:18:15.649129 382826 perf_serializer.cc:247] Unknown event type: 82
E20240628 22:18:28.603147 382826 perf_parser.cc:248] Unknown event type: 17
```

After that, I see `perf-hello-1.gcov` with only 1.6Kb, and nothing useful in it. `dump_gcov` isn't helpful, as it doesn't display anything.

My QEMU binary isn't stripped and still contains all debug symbols.

Any tips on how to proceed here?

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.