1 /* SPDX-License-Identifier: LGPL-2.1 */ 2 /* 3 * Private interface exposed to the python module. See python/ctracecmd.i and 4 * python/tracecmd.py. 5 */ 6 #ifndef _TRACE_CMD_PRIVATE_PYTHON_H 7 #define _TRACE_CMD_PRIVATE_PYTHON_H 8 9 int tracecmd_long_size(struct tracecmd_input *handle); 10 int tracecmd_cpus(struct tracecmd_input *handle); 11 12 struct tep_record * 13 tracecmd_read_next_data(struct tracecmd_input *handle, int *rec_cpu); 14 15 struct tep_record * 16 tracecmd_peek_data(struct tracecmd_input *handle, int cpu); 17 18 static inline struct tep_record * tracecmd_peek_data_ref(struct tracecmd_input * handle,int cpu)19tracecmd_peek_data_ref(struct tracecmd_input *handle, int cpu) 20 { 21 struct tep_record *rec = tracecmd_peek_data(handle, cpu); 22 if (rec) 23 rec->ref_count++; 24 return rec; 25 } 26 27 #endif /* _TRACE_CMD_PRIVATE_PYTHON_H */ 28