failed to open perf event file for event_type cpu-cycles: Permission Denied

338 views
Skip to first unread message

Alireza Khadem

unread,
May 15, 2023, 5:44:53 PM5/15/23
to Chromium-dev
Hi All,

I want to profile Chromium on my Android device:
Model name: Galaxy S10e
Model number: SM-G970U
Android version: 12
My device is not rooted.

I built chromium based on the instructions on this page. The content of my GN build file is this:
target_os = "android"
target_cpu = "arm64"
is_debug = false
blink_symbol_level = 2
symbol_level = 2
dcheck_always_on = false


After installing the apk, I open Chromium by clicking on the Chromium application on the phone screen, and then I run this command:
out/Default/bin/chrome_public_apk profile --profile-process=renderer -vv

It looks like simpleperf has this error (complete log file is attached):
simpleperf E event_selection_set.cpp:632] failed to open perf event file for event_type cpu-cycles: Permission denied

I checked simpleperf individually on a C++ binary file and it works correctly. I think the problem is that simpleperf is called from the bash user but Chrome is opened by another user, so simpleperf does not have access to the Chrome process.

I appreciate any help. Do I need root access for profiling Chromium?

Best,
- Alireza
error.log
Reply all
Reply to author
Forward
0 new messages