Lines Matching refs:opts
184 arm_spe_snapshot_resolve_auxtrace_defaults(struct record_opts *opts,
201 if (!opts->auxtrace_snapshot_size && !opts->auxtrace_mmap_pages) {
203 opts->auxtrace_mmap_pages = MiB(4) / page_size;
205 opts->auxtrace_mmap_pages = KiB(128) / page_size;
206 if (opts->mmap_pages == UINT_MAX)
207 opts->mmap_pages = KiB(256) / page_size;
209 } else if (!opts->auxtrace_mmap_pages && !privileged && opts->mmap_pages == UINT_MAX) {
210 opts->mmap_pages = KiB(256) / page_size;
217 if (!opts->auxtrace_snapshot_size)
218 opts->auxtrace_snapshot_size = opts->auxtrace_mmap_pages * (size_t)page_size;
224 if (!opts->auxtrace_mmap_pages) {
225 size_t sz = opts->auxtrace_snapshot_size;
228 opts->auxtrace_mmap_pages = roundup_pow_of_two(sz);
290 static int arm_spe_setup_aux_buffer(struct record_opts *opts)
297 if (opts->auxtrace_snapshot_mode) {
302 if (!opts->auxtrace_snapshot_size || !opts->auxtrace_mmap_pages)
303 arm_spe_snapshot_resolve_auxtrace_defaults(opts, privileged);
308 if (opts->auxtrace_snapshot_size > opts->auxtrace_mmap_pages * (size_t)page_size) {
310 opts->auxtrace_snapshot_size,
311 opts->auxtrace_mmap_pages * (size_t)page_size);
318 if (!opts->auxtrace_snapshot_size || !opts->auxtrace_mmap_pages) {
324 opts->auxtrace_snapshot_size);
328 if (!opts->auxtrace_mmap_pages) {
330 opts->auxtrace_mmap_pages = MiB(4) / page_size;
332 opts->auxtrace_mmap_pages = KiB(128) / page_size;
333 if (opts->mmap_pages == UINT_MAX)
334 opts->mmap_pages = KiB(256) / page_size;
339 if (opts->auxtrace_mmap_pages) {
340 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size;
354 struct record_opts *opts)
377 if (!record_opts__no_switch_events(opts))
386 struct record_opts *opts)
404 opts->full_auxtrace = true;
406 if (opts->user_freq != UINT_MAX ||
416 if (!opts->full_auxtrace)
431 err = arm_spe_setup_aux_buffer(opts);
435 return arm_spe_setup_tracking_event(evlist, opts);
439 struct record_opts *opts,
451 opts->auxtrace_snapshot_mode = true;
452 opts->auxtrace_snapshot_size = snapshot_size;