Lines Matching refs:btsr
67 struct intel_bts_recording *btsr = in intel_bts_info_fill() local
69 struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu; in intel_bts_info_fill()
100 auxtrace_info->priv[INTEL_BTS_SNAPSHOT_MODE] = btsr->snapshot_mode; in intel_bts_info_fill()
109 struct intel_bts_recording *btsr = in intel_bts_recording_options() local
111 struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu; in intel_bts_recording_options()
121 btsr->evlist = evlist; in intel_bts_recording_options()
122 btsr->snapshot_mode = opts->auxtrace_snapshot_mode; in intel_bts_recording_options()
254 struct intel_bts_recording *btsr = in intel_bts_parse_snapshot_options() local
268 btsr->snapshot_size = snapshot_size; in intel_bts_parse_snapshot_options()
278 static int intel_bts_alloc_snapshot_refs(struct intel_bts_recording *btsr, in intel_bts_alloc_snapshot_refs() argument
282 int cnt = btsr->snapshot_ref_cnt, new_cnt = cnt * 2; in intel_bts_alloc_snapshot_refs()
295 memcpy(refs, btsr->snapshot_refs, cnt * sz); in intel_bts_alloc_snapshot_refs()
297 btsr->snapshot_refs = refs; in intel_bts_alloc_snapshot_refs()
298 btsr->snapshot_ref_cnt = new_cnt; in intel_bts_alloc_snapshot_refs()
303 static void intel_bts_free_snapshot_refs(struct intel_bts_recording *btsr) in intel_bts_free_snapshot_refs() argument
307 for (i = 0; i < btsr->snapshot_ref_cnt; i++) in intel_bts_free_snapshot_refs()
308 zfree(&btsr->snapshot_refs[i].ref_buf); in intel_bts_free_snapshot_refs()
309 zfree(&btsr->snapshot_refs); in intel_bts_free_snapshot_refs()
314 struct intel_bts_recording *btsr = in intel_bts_recording_free() local
317 intel_bts_free_snapshot_refs(btsr); in intel_bts_recording_free()
318 free(btsr); in intel_bts_recording_free()
323 struct intel_bts_recording *btsr = in intel_bts_snapshot_start() local
327 evlist__for_each_entry(btsr->evlist, evsel) { in intel_bts_snapshot_start()
328 if (evsel->core.attr.type == btsr->intel_bts_pmu->type) in intel_bts_snapshot_start()
336 struct intel_bts_recording *btsr = in intel_bts_snapshot_finish() local
340 evlist__for_each_entry(btsr->evlist, evsel) { in intel_bts_snapshot_finish()
341 if (evsel->core.attr.type == btsr->intel_bts_pmu->type) in intel_bts_snapshot_finish()
368 struct intel_bts_recording *btsr = in intel_bts_find_snapshot() local
376 if (idx >= btsr->snapshot_ref_cnt) { in intel_bts_find_snapshot()
377 err = intel_bts_alloc_snapshot_refs(btsr, idx); in intel_bts_find_snapshot()
382 wrapped = btsr->snapshot_refs[idx].wrapped; in intel_bts_find_snapshot()
384 btsr->snapshot_refs[idx].wrapped = true; in intel_bts_find_snapshot()
419 struct intel_bts_recording *btsr; in intel_bts_recording_init() local
429 btsr = zalloc(sizeof(struct intel_bts_recording)); in intel_bts_recording_init()
430 if (!btsr) { in intel_bts_recording_init()
435 btsr->intel_bts_pmu = intel_bts_pmu; in intel_bts_recording_init()
436 btsr->itr.pmu = intel_bts_pmu; in intel_bts_recording_init()
437 btsr->itr.recording_options = intel_bts_recording_options; in intel_bts_recording_init()
438 btsr->itr.info_priv_size = intel_bts_info_priv_size; in intel_bts_recording_init()
439 btsr->itr.info_fill = intel_bts_info_fill; in intel_bts_recording_init()
440 btsr->itr.free = intel_bts_recording_free; in intel_bts_recording_init()
441 btsr->itr.snapshot_start = intel_bts_snapshot_start; in intel_bts_recording_init()
442 btsr->itr.snapshot_finish = intel_bts_snapshot_finish; in intel_bts_recording_init()
443 btsr->itr.find_snapshot = intel_bts_find_snapshot; in intel_bts_recording_init()
444 btsr->itr.parse_snapshot_options = intel_bts_parse_snapshot_options; in intel_bts_recording_init()
445 btsr->itr.reference = intel_bts_reference; in intel_bts_recording_init()
446 btsr->itr.read_finish = auxtrace_record__read_finish; in intel_bts_recording_init()
447 btsr->itr.alignment = sizeof(struct branch); in intel_bts_recording_init()
448 return &btsr->itr; in intel_bts_recording_init()