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()
255 struct intel_bts_recording *btsr = in intel_bts_parse_snapshot_options() local
269 btsr->snapshot_size = snapshot_size; in intel_bts_parse_snapshot_options()
279 static int intel_bts_alloc_snapshot_refs(struct intel_bts_recording *btsr, in intel_bts_alloc_snapshot_refs() argument
283 int cnt = btsr->snapshot_ref_cnt, new_cnt = cnt * 2; in intel_bts_alloc_snapshot_refs()
296 memcpy(refs, btsr->snapshot_refs, cnt * sz); in intel_bts_alloc_snapshot_refs()
298 btsr->snapshot_refs = refs; in intel_bts_alloc_snapshot_refs()
299 btsr->snapshot_ref_cnt = new_cnt; in intel_bts_alloc_snapshot_refs()
304 static void intel_bts_free_snapshot_refs(struct intel_bts_recording *btsr) in intel_bts_free_snapshot_refs() argument
308 for (i = 0; i < btsr->snapshot_ref_cnt; i++) in intel_bts_free_snapshot_refs()
309 zfree(&btsr->snapshot_refs[i].ref_buf); in intel_bts_free_snapshot_refs()
310 zfree(&btsr->snapshot_refs); in intel_bts_free_snapshot_refs()
315 struct intel_bts_recording *btsr = in intel_bts_recording_free() local
318 intel_bts_free_snapshot_refs(btsr); in intel_bts_recording_free()
319 free(btsr); in intel_bts_recording_free()
324 struct intel_bts_recording *btsr = in intel_bts_snapshot_start() local
328 evlist__for_each_entry(btsr->evlist, evsel) { in intel_bts_snapshot_start()
329 if (evsel->core.attr.type == btsr->intel_bts_pmu->type) in intel_bts_snapshot_start()
337 struct intel_bts_recording *btsr = in intel_bts_snapshot_finish() local
341 evlist__for_each_entry(btsr->evlist, evsel) { in intel_bts_snapshot_finish()
342 if (evsel->core.attr.type == btsr->intel_bts_pmu->type) in intel_bts_snapshot_finish()
369 struct intel_bts_recording *btsr = in intel_bts_find_snapshot() local
377 if (idx >= btsr->snapshot_ref_cnt) { in intel_bts_find_snapshot()
378 err = intel_bts_alloc_snapshot_refs(btsr, idx); in intel_bts_find_snapshot()
383 wrapped = btsr->snapshot_refs[idx].wrapped; in intel_bts_find_snapshot()
385 btsr->snapshot_refs[idx].wrapped = true; in intel_bts_find_snapshot()
420 struct intel_bts_recording *btsr; in intel_bts_recording_init() local
430 btsr = zalloc(sizeof(struct intel_bts_recording)); in intel_bts_recording_init()
431 if (!btsr) { in intel_bts_recording_init()
436 btsr->intel_bts_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()