| commit | 2abbc726fa5a7d786edefe4ce99d65d25e281aea | [log] [tgz] | 
|---|---|---|
| author | Daniele Di Proietto <ddiproietto@google.com> | Fri Sep 17 16:24:57 2021 +0000 | 
| committer | Daniele Di Proietto <ddiproietto@google.com> | Tue Sep 21 10:04:26 2021 +0000 | 
| tree | 942dc516cd9b93c2e56569bdeba4637ff5400240 | |
| parent | f96e82f3af570169e2e5beb3c1d83b6f39f71a0d [diff] | 
Avoid using fts_open and fts_read
b39ae485a46b("Link against libfts when compiling against musl") had to
introduce an additional dependency on libfts when building with musl as
libc.
Turns out that base::ListFilesRecursive() can be used instead. This has
two benefits:
* Doesn't require libfts when building with musl.
* Reduces platform dependend duplicated code.
perfetto::profiling::WalkDirectories() used a callback, while
base::ListFilesRecursive() returns a vector, so there might be a
performance difference with very large trees. If this turns out to be a
problem, base::ListFilesRecursive() can be changed to use a callback (or
return an iterator instead).
Bug: 200136875
Change-Id: I420e7b0ad7fe10666da9c39baf1ca046649588fd
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.