static ocsd_datapath_resp_t cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder, const u8 trace_chan_id, enum cs_etm_sample_type sample_type) { u32 et = 0; struct int_node *inode = NULL; if (decoder->packet_count >= MAX_BUFFER - 1) return OCSD_RESP_FATAL_SYS_ERR; /* Search the RB tree for the cpu associated with this traceID */ inode = intlist__find(traceid_list, trace_chan_id); if (!inode) return OCSD_RESP_FATAL_SYS_ERR; et = decoder->tail; et = (et + 1) & (MAX_BUFFER - 1); decoder->tail = et; decoder->packet_count++; decoder->packet_buffer[et].sample_type = sample_type; decoder->packet_buffer[et].exc = false; decoder->packet_buffer[et].exc_ret = false; decoder->packet_buffer[et].cpu = *((int *)inode->priv); decoder->packet_buffer[et].start_addr = 0xdeadbeefdeadbeefUL; decoder->packet_buffer[et].end_addr = 0xdeadbeefdeadbeefUL; if (decoder->packet_count == MAX_BUFFER - 1) return OCSD_RESP_WAIT; return OCSD_RESP_CONT; }
for_each_test(j, t) { int curr = i++, err; if (!perf_test__matches(t, curr, argc, argv)) continue; pr_info("%2d: %-*s:", i, width, t->desc); if (intlist__find(skiplist, i)) { color_fprintf(stderr, PERF_COLOR_YELLOW, " Skip (user override)\n"); continue; } if (!t->subtest.get_nr) { test_and_print(t, false, -1); } else { int subn = t->subtest.get_nr(); /* * minus 2 to align with normal testcases. * For subtest we print additional '.x' in number. * for example: * * 35: Test LLVM searching and compiling : * 35.1: Basic BPF llvm compiling test : Ok */ int subw = width > 2 ? width - 2 : width; bool skip = false; int subi; if (subn <= 0) { color_fprintf(stderr, PERF_COLOR_YELLOW, " Skip (not compiled in)\n"); continue; } pr_info("\n"); for (subi = 0; subi < subn; subi++) { int len = strlen(t->subtest.get_desc(subi)); if (subw < len) subw = len; } for (subi = 0; subi < subn; subi++) { pr_info("%2d.%1d: %-*s:", i, subi + 1, subw, t->subtest.get_desc(subi)); err = test_and_print(t, skip, subi); if (err != TEST_OK && t->subtest.skip_if_fail) skip = true; } } }