> > So the problem I have with this is that it will completely inhibit > > development of things like JITs that self-profile to re-compile > > frequently used code. > > Or reimplement strace with sys_perf_event_open(), speeding it up > greatly > by not using ptrace (see 'perf trace', one such attempt), combining it > with sys_bpf(), which can run unpriviledged as well, provides lots of > possibilities for efficient tooling that would be greatly stiffled by > such big hammer restrictions :-( The usage on Android wouldn't impact strace. It's a debugging tool used over the debugging shell so it could be taught to toggle on unprivileged access to perf events as the other tools using the API were.