tidq 220 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 225 tools/perf/util/cs-etm.c tidq = etmq->traceid_queues[idx]; tidq 226 tools/perf/util/cs-etm.c cs_etm__clear_packet_queue(&tidq->packet_queue); tidq 231 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq, tidq 238 tools/perf/util/cs-etm.c cs_etm__clear_packet_queue(&tidq->packet_queue); tidq 241 tools/perf/util/cs-etm.c tidq->tid = queue->tid; tidq 242 tools/perf/util/cs-etm.c tidq->pid = -1; tidq 243 tools/perf/util/cs-etm.c tidq->trace_chan_id = trace_chan_id; tidq 245 tools/perf/util/cs-etm.c tidq->packet = zalloc(sizeof(struct cs_etm_packet)); tidq 246 tools/perf/util/cs-etm.c if (!tidq->packet) tidq 249 tools/perf/util/cs-etm.c tidq->prev_packet = zalloc(sizeof(struct cs_etm_packet)); tidq 250 tools/perf/util/cs-etm.c if (!tidq->prev_packet) tidq 258 tools/perf/util/cs-etm.c tidq->last_branch = zalloc(sz); tidq 259 tools/perf/util/cs-etm.c if (!tidq->last_branch) tidq 261 tools/perf/util/cs-etm.c tidq->last_branch_rb = zalloc(sz); tidq 262 tools/perf/util/cs-etm.c if (!tidq->last_branch_rb) tidq 266 tools/perf/util/cs-etm.c tidq->event_buf = malloc(PERF_SAMPLE_MAX_SIZE); tidq 267 tools/perf/util/cs-etm.c if (!tidq->event_buf) tidq 273 tools/perf/util/cs-etm.c zfree(&tidq->last_branch_rb); tidq 274 tools/perf/util/cs-etm.c zfree(&tidq->last_branch); tidq 275 tools/perf/util/cs-etm.c zfree(&tidq->prev_packet); tidq 276 tools/perf/util/cs-etm.c zfree(&tidq->packet); tidq 287 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq, **traceid_queues; tidq 306 tools/perf/util/cs-etm.c tidq = malloc(sizeof(*tidq)); tidq 307 tools/perf/util/cs-etm.c if (!tidq) tidq 310 tools/perf/util/cs-etm.c memset(tidq, 0, sizeof(*tidq)); tidq 322 tools/perf/util/cs-etm.c if (cs_etm__init_traceid_queue(etmq, tidq, trace_chan_id)) tidq 338 tools/perf/util/cs-etm.c traceid_queues[idx] = tidq; tidq 349 tools/perf/util/cs-etm.c free(tidq); tidq 357 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 359 tools/perf/util/cs-etm.c tidq = cs_etm__etmq_get_traceid_queue(etmq, trace_chan_id); tidq 360 tools/perf/util/cs-etm.c if (tidq) tidq 361 tools/perf/util/cs-etm.c return &tidq->packet_queue; tidq 533 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 541 tools/perf/util/cs-etm.c tidq = etmq->traceid_queues[idx]; tidq 542 tools/perf/util/cs-etm.c thread__zput(tidq->thread); tidq 543 tools/perf/util/cs-etm.c zfree(&tidq->event_buf); tidq 544 tools/perf/util/cs-etm.c zfree(&tidq->last_branch); tidq 545 tools/perf/util/cs-etm.c zfree(&tidq->last_branch_rb); tidq 546 tools/perf/util/cs-etm.c zfree(&tidq->prev_packet); tidq 547 tools/perf/util/cs-etm.c zfree(&tidq->packet); tidq 548 tools/perf/util/cs-etm.c zfree(&tidq); tidq 647 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 654 tools/perf/util/cs-etm.c tidq = cs_etm__etmq_get_traceid_queue(etmq, trace_chan_id); tidq 655 tools/perf/util/cs-etm.c if (!tidq) tidq 658 tools/perf/util/cs-etm.c thread = tidq->thread; tidq 857 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 859 tools/perf/util/cs-etm.c struct branch_stack *bs_src = tidq->last_branch_rb; tidq 860 tools/perf/util/cs-etm.c struct branch_stack *bs_dst = tidq->last_branch; tidq 880 tools/perf/util/cs-etm.c nr = etmq->etm->synth_opts.last_branch_sz - tidq->last_branch_pos; tidq 882 tools/perf/util/cs-etm.c &bs_src->entries[tidq->last_branch_pos], tidq 895 tools/perf/util/cs-etm.c sizeof(struct branch_entry) * tidq->last_branch_pos); tidq 900 tools/perf/util/cs-etm.c void cs_etm__reset_last_branch_rb(struct cs_etm_traceid_queue *tidq) tidq 902 tools/perf/util/cs-etm.c tidq->last_branch_pos = 0; tidq 903 tools/perf/util/cs-etm.c tidq->last_branch_rb->nr = 0; tidq 961 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 963 tools/perf/util/cs-etm.c struct branch_stack *bs = tidq->last_branch_rb; tidq 972 tools/perf/util/cs-etm.c if (!tidq->last_branch_pos) tidq 973 tools/perf/util/cs-etm.c tidq->last_branch_pos = etmq->etm->synth_opts.last_branch_sz; tidq 975 tools/perf/util/cs-etm.c tidq->last_branch_pos -= 1; tidq 977 tools/perf/util/cs-etm.c be = &bs->entries[tidq->last_branch_pos]; tidq 978 tools/perf/util/cs-etm.c be->from = cs_etm__last_executed_instr(tidq->prev_packet); tidq 979 tools/perf/util/cs-etm.c be->to = cs_etm__first_executed_instr(tidq->packet); tidq 1043 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1045 tools/perf/util/cs-etm.c if ((!tidq->thread) && (tidq->tid != -1)) tidq 1046 tools/perf/util/cs-etm.c tidq->thread = machine__find_thread(etm->machine, -1, tidq 1047 tools/perf/util/cs-etm.c tidq->tid); tidq 1049 tools/perf/util/cs-etm.c if (tidq->thread) tidq 1050 tools/perf/util/cs-etm.c tidq->pid = tidq->thread->pid_; tidq 1058 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 1060 tools/perf/util/cs-etm.c tidq = cs_etm__etmq_get_traceid_queue(etmq, trace_chan_id); tidq 1061 tools/perf/util/cs-etm.c if (!tidq) tidq 1071 tools/perf/util/cs-etm.c tidq->tid = tid; tidq 1072 tools/perf/util/cs-etm.c thread__zput(tidq->thread); tidq 1074 tools/perf/util/cs-etm.c cs_etm__set_pid_tid_cpu(etm, tidq); tidq 1113 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq, tidq 1118 tools/perf/util/cs-etm.c union perf_event *event = tidq->event_buf; tidq 1126 tools/perf/util/cs-etm.c sample.pid = tidq->pid; tidq 1127 tools/perf/util/cs-etm.c sample.tid = tidq->tid; tidq 1131 tools/perf/util/cs-etm.c sample.cpu = tidq->packet->cpu; tidq 1132 tools/perf/util/cs-etm.c sample.flags = tidq->prev_packet->flags; tidq 1135 tools/perf/util/cs-etm.c cs_etm__copy_insn(etmq, tidq->trace_chan_id, tidq->packet, &sample); tidq 1138 tools/perf/util/cs-etm.c cs_etm__copy_last_branch_rb(etmq, tidq); tidq 1139 tools/perf/util/cs-etm.c sample.branch_stack = tidq->last_branch; tidq 1157 tools/perf/util/cs-etm.c cs_etm__reset_last_branch_rb(tidq); tidq 1167 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1172 tools/perf/util/cs-etm.c union perf_event *event = tidq->event_buf; tidq 1179 tools/perf/util/cs-etm.c ip = cs_etm__last_executed_instr(tidq->prev_packet); tidq 1186 tools/perf/util/cs-etm.c sample.pid = tidq->pid; tidq 1187 tools/perf/util/cs-etm.c sample.tid = tidq->tid; tidq 1188 tools/perf/util/cs-etm.c sample.addr = cs_etm__first_executed_instr(tidq->packet); tidq 1192 tools/perf/util/cs-etm.c sample.cpu = tidq->packet->cpu; tidq 1193 tools/perf/util/cs-etm.c sample.flags = tidq->prev_packet->flags; tidq 1196 tools/perf/util/cs-etm.c cs_etm__copy_insn(etmq, tidq->trace_chan_id, tidq->prev_packet, tidq 1340 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1345 tools/perf/util/cs-etm.c u8 trace_chan_id = tidq->trace_chan_id; tidq 1346 tools/perf/util/cs-etm.c u64 instrs_executed = tidq->packet->instr_count; tidq 1348 tools/perf/util/cs-etm.c tidq->period_instructions += instrs_executed; tidq 1355 tools/perf/util/cs-etm.c tidq->prev_packet->sample_type == CS_ETM_RANGE && tidq 1356 tools/perf/util/cs-etm.c tidq->prev_packet->last_instr_taken_branch) tidq 1357 tools/perf/util/cs-etm.c cs_etm__update_last_branch_rb(etmq, tidq); tidq 1360 tools/perf/util/cs-etm.c tidq->period_instructions >= etm->instructions_sample_period) { tidq 1367 tools/perf/util/cs-etm.c u64 instrs_over = tidq->period_instructions - tidq 1377 tools/perf/util/cs-etm.c tidq->packet, offset); tidq 1380 tools/perf/util/cs-etm.c etmq, tidq, addr, etm->instructions_sample_period); tidq 1385 tools/perf/util/cs-etm.c tidq->period_instructions = instrs_over; tidq 1392 tools/perf/util/cs-etm.c if (tidq->prev_packet->sample_type == CS_ETM_DISCONTINUITY) tidq 1396 tools/perf/util/cs-etm.c if (tidq->prev_packet->sample_type == CS_ETM_RANGE && tidq 1397 tools/perf/util/cs-etm.c tidq->prev_packet->last_instr_taken_branch) tidq 1401 tools/perf/util/cs-etm.c ret = cs_etm__synth_branch_sample(etmq, tidq); tidq 1412 tools/perf/util/cs-etm.c tmp = tidq->packet; tidq 1413 tools/perf/util/cs-etm.c tidq->packet = tidq->prev_packet; tidq 1414 tools/perf/util/cs-etm.c tidq->prev_packet = tmp; tidq 1420 tools/perf/util/cs-etm.c static int cs_etm__exception(struct cs_etm_traceid_queue *tidq) tidq 1433 tools/perf/util/cs-etm.c if (tidq->prev_packet->sample_type == CS_ETM_RANGE) tidq 1434 tools/perf/util/cs-etm.c tidq->prev_packet->last_instr_taken_branch = true; tidq 1440 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1447 tools/perf/util/cs-etm.c if (tidq->prev_packet->sample_type == CS_ETM_EMPTY) tidq 1451 tools/perf/util/cs-etm.c tidq->prev_packet->sample_type == CS_ETM_RANGE) { tidq 1459 tools/perf/util/cs-etm.c u64 addr = cs_etm__last_executed_instr(tidq->prev_packet); tidq 1462 tools/perf/util/cs-etm.c etmq, tidq, addr, tidq 1463 tools/perf/util/cs-etm.c tidq->period_instructions); tidq 1467 tools/perf/util/cs-etm.c tidq->period_instructions = 0; tidq 1472 tools/perf/util/cs-etm.c tidq->prev_packet->sample_type == CS_ETM_RANGE) { tidq 1473 tools/perf/util/cs-etm.c err = cs_etm__synth_branch_sample(etmq, tidq); tidq 1484 tools/perf/util/cs-etm.c tmp = tidq->packet; tidq 1485 tools/perf/util/cs-etm.c tidq->packet = tidq->prev_packet; tidq 1486 tools/perf/util/cs-etm.c tidq->prev_packet = tmp; tidq 1493 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1507 tools/perf/util/cs-etm.c tidq->prev_packet->sample_type == CS_ETM_RANGE) { tidq 1512 tools/perf/util/cs-etm.c u64 addr = cs_etm__last_executed_instr(tidq->prev_packet); tidq 1515 tools/perf/util/cs-etm.c etmq, tidq, addr, tidq 1516 tools/perf/util/cs-etm.c tidq->period_instructions); tidq 1520 tools/perf/util/cs-etm.c tidq->period_instructions = 0; tidq 1624 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq, u64 magic) tidq 1626 tools/perf/util/cs-etm.c u8 trace_chan_id = tidq->trace_chan_id; tidq 1627 tools/perf/util/cs-etm.c struct cs_etm_packet *packet = tidq->packet; tidq 1628 tools/perf/util/cs-etm.c struct cs_etm_packet *prev_packet = tidq->prev_packet; tidq 1649 tools/perf/util/cs-etm.c static bool cs_etm__is_async_exception(struct cs_etm_traceid_queue *tidq, tidq 1652 tools/perf/util/cs-etm.c struct cs_etm_packet *packet = tidq->packet; tidq 1676 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq, tidq 1679 tools/perf/util/cs-etm.c u8 trace_chan_id = tidq->trace_chan_id; tidq 1680 tools/perf/util/cs-etm.c struct cs_etm_packet *packet = tidq->packet; tidq 1681 tools/perf/util/cs-etm.c struct cs_etm_packet *prev_packet = tidq->prev_packet; tidq 1725 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1727 tools/perf/util/cs-etm.c struct cs_etm_packet *packet = tidq->packet; tidq 1728 tools/perf/util/cs-etm.c struct cs_etm_packet *prev_packet = tidq->prev_packet; tidq 1729 tools/perf/util/cs-etm.c u8 trace_chan_id = tidq->trace_chan_id; tidq 1832 tools/perf/util/cs-etm.c if (cs_etm__is_syscall(etmq, tidq, magic)) tidq 1840 tools/perf/util/cs-etm.c else if (cs_etm__is_async_exception(tidq, magic)) tidq 1849 tools/perf/util/cs-etm.c else if (cs_etm__is_sync_exception(etmq, tidq, magic)) tidq 1932 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq) tidq 1937 tools/perf/util/cs-etm.c packet_queue = &tidq->packet_queue; tidq 1942 tools/perf/util/cs-etm.c tidq->packet); tidq 1957 tools/perf/util/cs-etm.c ret = cs_etm__set_sample_flags(etmq, tidq); tidq 1961 tools/perf/util/cs-etm.c switch (tidq->packet->sample_type) { tidq 1968 tools/perf/util/cs-etm.c cs_etm__sample(etmq, tidq); tidq 1977 tools/perf/util/cs-etm.c cs_etm__exception(tidq); tidq 1984 tools/perf/util/cs-etm.c cs_etm__flush(etmq, tidq); tidq 2005 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 2010 tools/perf/util/cs-etm.c tidq = etmq->traceid_queues[idx]; tidq 2013 tools/perf/util/cs-etm.c cs_etm__process_traceid_queue(etmq, tidq); tidq 2019 tools/perf/util/cs-etm.c cs_etm__flush(etmq, tidq); tidq 2026 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 2028 tools/perf/util/cs-etm.c tidq = cs_etm__etmq_get_traceid_queue(etmq, CS_ETM_PER_THREAD_TRACEID); tidq 2029 tools/perf/util/cs-etm.c if (!tidq) tidq 2049 tools/perf/util/cs-etm.c err = cs_etm__process_traceid_queue(etmq, tidq); tidq 2055 tools/perf/util/cs-etm.c err = cs_etm__end_block(etmq, tidq); tidq 2070 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 2075 tools/perf/util/cs-etm.c tidq = cs_etm__etmq_get_traceid_queue(etmq, tidq 2078 tools/perf/util/cs-etm.c if (!tidq) tidq 2081 tools/perf/util/cs-etm.c if ((tid == -1) || (tidq->tid == tid)) { tidq 2082 tools/perf/util/cs-etm.c cs_etm__set_pid_tid_cpu(etm, tidq); tidq 2098 tools/perf/util/cs-etm.c struct cs_etm_traceid_queue *tidq; tidq 2117 tools/perf/util/cs-etm.c tidq = cs_etm__etmq_get_traceid_queue(etmq, trace_chan_id); tidq 2118 tools/perf/util/cs-etm.c if (!tidq) { tidq 2132 tools/perf/util/cs-etm.c ret = cs_etm__process_traceid_queue(etmq, tidq);