Skip to content

Commit

Permalink
set shmem_size_hint to same as with vperfetto_min
Browse files Browse the repository at this point in the history
  • Loading branch information
gerddie committed Feb 23, 2021
1 parent 1b3c55c commit 8eef485
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/percetto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ int percetto_init(size_t category_count,

perfetto::TracingInitArgs args;
args.backends = perfetto::kSystemBackend;
args.shmem_size_hint_kb = 32 * 1024;

This comment has been minimized.

Copy link
@batesj

batesj Feb 25, 2021

Collaborator

In the latest commit I moved this out to an alternate PERCETTO_INIT_WITH_ARGS macro. However, this is way too big to be the default for virglrenderer (32MB). I think we should stick with the defaults (256KB) for virglrenderer. Not sure why vperfetto_min had it set to 32MB.

This comment has been minimized.

Copy link
@gerddie

gerddie Feb 25, 2021

Author Contributor

As I understand it perfetto uses the first config value it is initialized with, and ignores anything that comes later, so I wonder whether there would be a way to move this out into a common configuration file that is read by the initialization code. and since all calls into the initialization read the same configuration we would avoid having a value that is randomly based on what is library calls the initialization first.

This comment has been minimized.

Copy link
@batesj

batesj Feb 25, 2021

Collaborator

I filed #11 to come up with a solution which we will need when percetto becomes a shared library. A limitation with percetto currently is that it is static and expects the embedder to only call percetto_init once. More discussion on the issue.

perfetto::Tracing::Initialize(args);

return PercettoDataSource::Register() ? 0 : -1;
Expand Down

0 comments on commit 8eef485

Please sign in to comment.