// SPDX-License-Identifier: GPL-2.0/* * Copyright(C) 2015-2018 Linaro Limited. * * Author: Tor Jeremiassen <tor@ti.com> * Author: Mathieu Poirier <mathieu.poirier@linaro.org> */#include<linux/bitops.h>#include<linux/err.h>#include<linux/kernel.h>#include<linux/log2.h>#include<linux/types.h>#include<stdlib.h>#include"auxtrace.h"#include"color.h"#include"cs-etm.h"#include"cs-etm-decoder/cs-etm-decoder.h"#include"debug.h"#include"evlist.h"#include"intlist.h"#include"machine.h"#include"map.h"#include"perf.h"#include"thread.h"#include"thread_map.h"#include"thread-stack.h"#include"util.h"#define MAX_TIMESTAMP (~0ULL)/* * A64 instructions are always 4 bytes * * Only A64 is supported, so can use this constant for converting between * addresses and instruction counts, calculting offsets etc */#define A64_INSTR_SIZE 4structcs_etm_auxtrace{structauxtraceauxtrace;structauxtrace_queuesqueues;structauxtrace_heapheap;structitrace_synth_optssynth_opts;structperf_session*session;structmachine*machine;structthread*unknown_thread;u8timeless_decoding;u8snapshot_mode;u8data_queued;u8sample_branches;u8sample_instructions;intnum_cpu;u32auxtrace_type;u64branches_sample_type;u64branches_id;u64instructions_sample_type;u64instructions_sample_period;u64instructions_id;u64**metadata;u64kernel_start;unsignedintpmu_type;};structcs_etm_queue{structcs_etm_auxtrace*etm;structthread*thread;structcs_etm_decoder*decoder;