18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * intel-bts.h: Intel Processor Trace support 48c2ecf20Sopenharmony_ci * Copyright (c) 2013-2014, Intel Corporation. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef INCLUDE__PERF_INTEL_BTS_H__ 88c2ecf20Sopenharmony_ci#define INCLUDE__PERF_INTEL_BTS_H__ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#define INTEL_BTS_PMU_NAME "intel_bts" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cienum { 138c2ecf20Sopenharmony_ci INTEL_BTS_PMU_TYPE, 148c2ecf20Sopenharmony_ci INTEL_BTS_TIME_SHIFT, 158c2ecf20Sopenharmony_ci INTEL_BTS_TIME_MULT, 168c2ecf20Sopenharmony_ci INTEL_BTS_TIME_ZERO, 178c2ecf20Sopenharmony_ci INTEL_BTS_CAP_USER_TIME_ZERO, 188c2ecf20Sopenharmony_ci INTEL_BTS_SNAPSHOT_MODE, 198c2ecf20Sopenharmony_ci INTEL_BTS_AUXTRACE_PRIV_MAX, 208c2ecf20Sopenharmony_ci}; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define INTEL_BTS_AUXTRACE_PRIV_SIZE (INTEL_BTS_AUXTRACE_PRIV_MAX * sizeof(u64)) 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_cistruct auxtrace_record; 258c2ecf20Sopenharmony_cistruct perf_tool; 268c2ecf20Sopenharmony_ciunion perf_event; 278c2ecf20Sopenharmony_cistruct perf_session; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_cistruct auxtrace_record *intel_bts_recording_init(int *err); 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciint intel_bts_process_auxtrace_info(union perf_event *event, 328c2ecf20Sopenharmony_ci struct perf_session *session); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#endif 35