Lines Matching full:decoder

46 static void pt_insn_reset(struct pt_insn_decoder *decoder)  in pt_insn_reset()  argument
48 if (!decoder) in pt_insn_reset()
51 decoder->mode = ptem_unknown; in pt_insn_reset()
52 decoder->ip = 0ull; in pt_insn_reset()
53 decoder->status = 0; in pt_insn_reset()
54 decoder->enabled = 0; in pt_insn_reset()
55 decoder->process_event = 0; in pt_insn_reset()
56 decoder->speculative = 0; in pt_insn_reset()
57 decoder->process_insn = 0; in pt_insn_reset()
58 decoder->bound_paging = 0; in pt_insn_reset()
59 decoder->bound_vmcs = 0; in pt_insn_reset()
60 decoder->bound_ptwrite = 0; in pt_insn_reset()
62 pt_retstack_init(&decoder->retstack); in pt_insn_reset()
63 pt_asid_init(&decoder->asid); in pt_insn_reset()
66 static int pt_insn_status(const struct pt_insn_decoder *decoder, int flags) in pt_insn_status() argument
70 if (!decoder) in pt_insn_status()
73 status = decoder->status; in pt_insn_status()
80 if (!decoder->enabled) in pt_insn_status()
87 if ((status & pts_eos) && !decoder->process_event) in pt_insn_status()
93 /* Initialize the query decoder flags based on our flags. */
108 int pt_insn_decoder_init(struct pt_insn_decoder *decoder, in pt_insn_decoder_init() argument
114 if (!decoder) in pt_insn_decoder_init()
121 /* The user supplied decoder flags. */ in pt_insn_decoder_init()
122 decoder->flags = config.flags; in pt_insn_decoder_init()
124 /* Set the flags we need for the query decoder we use. */ in pt_insn_decoder_init()
125 errcode = pt_insn_init_qry_flags(&config.flags, &decoder->flags); in pt_insn_decoder_init()
129 errcode = pt_qry_decoder_init(&decoder->query, &config); in pt_insn_decoder_init()
133 pt_image_init(&decoder->default_image, NULL); in pt_insn_decoder_init()
134 decoder->image = &decoder->default_image; in pt_insn_decoder_init()
136 errcode = pt_msec_cache_init(&decoder->scache); in pt_insn_decoder_init()
140 pt_insn_reset(decoder); in pt_insn_decoder_init()
145 void pt_insn_decoder_fini(struct pt_insn_decoder *decoder) in pt_insn_decoder_fini() argument
147 if (!decoder) in pt_insn_decoder_fini()
150 pt_msec_cache_fini(&decoder->scache); in pt_insn_decoder_fini()
151 pt_image_fini(&decoder->default_image); in pt_insn_decoder_fini()
152 pt_qry_decoder_fini(&decoder->query); in pt_insn_decoder_fini()
157 struct pt_insn_decoder *decoder; in pt_insn_alloc_decoder() local
160 decoder = malloc(sizeof(*decoder)); in pt_insn_alloc_decoder()
161 if (!decoder) in pt_insn_alloc_decoder()
164 errcode = pt_insn_decoder_init(decoder, config); in pt_insn_alloc_decoder()
166 free(decoder); in pt_insn_alloc_decoder()
170 return decoder; in pt_insn_alloc_decoder()
173 void pt_insn_free_decoder(struct pt_insn_decoder *decoder) in pt_insn_free_decoder() argument
175 if (!decoder) in pt_insn_free_decoder()
178 pt_insn_decoder_fini(decoder); in pt_insn_free_decoder()
179 free(decoder); in pt_insn_free_decoder()
191 static int pt_insn_tick(struct pt_insn_decoder *decoder, uint64_t ip) in pt_insn_tick() argument
198 if (!decoder) in pt_insn_tick()
202 if (!decoder->enabled) in pt_insn_tick()
216 if (decoder->process_event) in pt_insn_tick()
219 errcode = pt_qry_time(&decoder->query, &tsc, &lost_mtc, &lost_cyc); in pt_insn_tick()
226 ev = &decoder->event; in pt_insn_tick()
245 decoder->process_event = 1; in pt_insn_tick()
254 static int pt_insn_indirect_branch(struct pt_insn_decoder *decoder, in pt_insn_indirect_branch() argument
260 if (!decoder) in pt_insn_indirect_branch()
263 evip = decoder->ip; in pt_insn_indirect_branch()
265 status = pt_qry_indirect_branch(&decoder->query, ip); in pt_insn_indirect_branch()
269 if (decoder->flags.variant.insn.enable_tick_events) { in pt_insn_indirect_branch()
270 errcode = pt_insn_tick(decoder, evip); in pt_insn_indirect_branch()
282 static int pt_insn_cond_branch(struct pt_insn_decoder *decoder, int *taken) in pt_insn_cond_branch() argument
286 if (!decoder) in pt_insn_cond_branch()
289 status = pt_qry_cond_branch(&decoder->query, taken); in pt_insn_cond_branch()
293 if (decoder->flags.variant.insn.enable_tick_events) { in pt_insn_cond_branch()
294 errcode = pt_insn_tick(decoder, decoder->ip); in pt_insn_cond_branch()
302 static int pt_insn_start(struct pt_insn_decoder *decoder, int status) in pt_insn_start() argument
304 if (!decoder) in pt_insn_start()
310 decoder->status = status; in pt_insn_start()
313 decoder->enabled = 1; in pt_insn_start()
325 return pt_insn_check_ip_event(decoder, NULL, NULL); in pt_insn_start()
328 int pt_insn_sync_forward(struct pt_insn_decoder *decoder) in pt_insn_sync_forward() argument
332 if (!decoder) in pt_insn_sync_forward()
335 pt_insn_reset(decoder); in pt_insn_sync_forward()
337 status = pt_qry_sync_forward(&decoder->query, &decoder->ip); in pt_insn_sync_forward()
339 return pt_insn_start(decoder, status); in pt_insn_sync_forward()
342 int pt_insn_sync_backward(struct pt_insn_decoder *decoder) in pt_insn_sync_backward() argument
346 if (!decoder) in pt_insn_sync_backward()
349 pt_insn_reset(decoder); in pt_insn_sync_backward()
351 status = pt_qry_sync_backward(&decoder->query, &decoder->ip); in pt_insn_sync_backward()
353 return pt_insn_start(decoder, status); in pt_insn_sync_backward()
356 int pt_insn_sync_set(struct pt_insn_decoder *decoder, uint64_t offset) in pt_insn_sync_set() argument
360 if (!decoder) in pt_insn_sync_set()
363 pt_insn_reset(decoder); in pt_insn_sync_set()
365 status = pt_qry_sync_set(&decoder->query, &decoder->ip, offset); in pt_insn_sync_set()
367 return pt_insn_start(decoder, status); in pt_insn_sync_set()
370 int pt_insn_get_offset(const struct pt_insn_decoder *decoder, uint64_t *offset) in pt_insn_get_offset() argument
372 if (!decoder) in pt_insn_get_offset()
375 return pt_qry_get_offset(&decoder->query, offset); in pt_insn_get_offset()
378 int pt_insn_get_sync_offset(const struct pt_insn_decoder *decoder, in pt_insn_get_sync_offset() argument
381 if (!decoder) in pt_insn_get_sync_offset()
384 return pt_qry_get_sync_offset(&decoder->query, offset); in pt_insn_get_sync_offset()
387 struct pt_image *pt_insn_get_image(struct pt_insn_decoder *decoder) in pt_insn_get_image() argument
389 if (!decoder) in pt_insn_get_image()
392 return decoder->image; in pt_insn_get_image()
395 int pt_insn_set_image(struct pt_insn_decoder *decoder, in pt_insn_set_image() argument
398 if (!decoder) in pt_insn_set_image()
402 image = &decoder->default_image; in pt_insn_set_image()
404 decoder->image = image; in pt_insn_set_image()
409 pt_insn_get_config(const struct pt_insn_decoder *decoder) in pt_insn_get_config() argument
411 if (!decoder) in pt_insn_get_config()
414 return pt_qry_get_config(&decoder->query); in pt_insn_get_config()
417 int pt_insn_time(struct pt_insn_decoder *decoder, uint64_t *time, in pt_insn_time() argument
420 if (!decoder || !time) in pt_insn_time()
423 return pt_qry_time(&decoder->query, time, lost_mtc, lost_cyc); in pt_insn_time()
426 int pt_insn_core_bus_ratio(struct pt_insn_decoder *decoder, uint32_t *cbr) in pt_insn_core_bus_ratio() argument
428 if (!decoder || !cbr) in pt_insn_core_bus_ratio()
431 return pt_qry_core_bus_ratio(&decoder->query, cbr); in pt_insn_core_bus_ratio()
434 int pt_insn_asid(const struct pt_insn_decoder *decoder, struct pt_asid *asid, in pt_insn_asid() argument
437 if (!decoder || !asid) in pt_insn_asid()
440 return pt_asid_to_user(asid, &decoder->asid, size); in pt_insn_asid()
443 static inline int event_pending(struct pt_insn_decoder *decoder) in event_pending() argument
447 if (!decoder) in event_pending()
450 if (decoder->process_event) in event_pending()
453 status = decoder->status; in event_pending()
457 status = pt_qry_event(&decoder->query, &decoder->event, in event_pending()
458 sizeof(decoder->event)); in event_pending()
462 decoder->process_event = 1; in event_pending()
463 decoder->status = status; in event_pending()
467 static int check_erratum_skd022(struct pt_insn_decoder *decoder) in check_erratum_skd022() argument
473 if (!decoder) in check_erratum_skd022()
476 insn.mode = decoder->mode; in check_erratum_skd022()
477 insn.ip = decoder->ip; in check_erratum_skd022()
479 errcode = pt_insn_decode(&insn, &iext, decoder->image, &decoder->asid); in check_erratum_skd022()
493 static inline int handle_erratum_skd022(struct pt_insn_decoder *decoder) in handle_erratum_skd022() argument
499 if (!decoder) in handle_erratum_skd022()
502 errcode = check_erratum_skd022(decoder); in handle_erratum_skd022()
509 ev = &decoder->event; in handle_erratum_skd022()
519 static int pt_insn_proceed(struct pt_insn_decoder *decoder, in pt_insn_proceed() argument
523 if (!decoder || !insn || !iext) in pt_insn_proceed()
527 decoder->ip += insn->size; in pt_insn_proceed()
543 status = pt_insn_cond_branch(decoder, &taken); in pt_insn_proceed()
547 decoder->status = status; in pt_insn_proceed()
562 pt_retstack_push(&decoder->retstack, decoder->ip); in pt_insn_proceed()
570 status = pt_insn_cond_branch(decoder, &taken); in pt_insn_proceed()
572 decoder->status = status; in pt_insn_proceed()
580 return pt_retstack_pop(&decoder->retstack, in pt_insn_proceed()
581 &decoder->ip); in pt_insn_proceed()
603 decoder->ip += (uint64_t) (int64_t) in pt_insn_proceed()
608 status = pt_insn_indirect_branch(decoder, &decoder->ip); in pt_insn_proceed()
613 decoder->status = status; in pt_insn_proceed()
735 static int pt_insn_postpone(struct pt_insn_decoder *decoder, in pt_insn_postpone() argument
739 if (!decoder || !insn || !iext) in pt_insn_postpone()
742 if (!decoder->process_insn) { in pt_insn_postpone()
743 decoder->process_insn = 1; in pt_insn_postpone()
744 decoder->insn = *insn; in pt_insn_postpone()
745 decoder->iext = *iext; in pt_insn_postpone()
748 return pt_insn_status(decoder, pts_event_pending); in pt_insn_postpone()
751 /* Remove any postponed instruction from @decoder.
755 static int pt_insn_clear_postponed(struct pt_insn_decoder *decoder) in pt_insn_clear_postponed() argument
757 if (!decoder) in pt_insn_clear_postponed()
760 decoder->process_insn = 0; in pt_insn_clear_postponed()
761 decoder->bound_paging = 0; in pt_insn_clear_postponed()
762 decoder->bound_vmcs = 0; in pt_insn_clear_postponed()
763 decoder->bound_ptwrite = 0; in pt_insn_clear_postponed()
772 static int pt_insn_proceed_postponed(struct pt_insn_decoder *decoder) in pt_insn_proceed_postponed() argument
776 if (!decoder) in pt_insn_proceed_postponed()
779 if (!decoder->process_insn) in pt_insn_proceed_postponed()
783 if (!decoder->enabled) in pt_insn_proceed_postponed()
784 return pt_insn_clear_postponed(decoder); in pt_insn_proceed_postponed()
786 status = pt_insn_proceed(decoder, &decoder->insn, &decoder->iext); in pt_insn_proceed_postponed()
790 return pt_insn_clear_postponed(decoder); in pt_insn_proceed_postponed()
808 static int pt_insn_check_insn_event(struct pt_insn_decoder *decoder, in pt_insn_check_insn_event() argument
815 if (!decoder) in pt_insn_check_insn_event()
818 status = event_pending(decoder); in pt_insn_check_insn_event()
822 ev = &decoder->event; in pt_insn_check_insn_event()
845 &decoder->query.config); in pt_insn_check_insn_event()
853 status = pt_insn_next_ip(&decoder->ip, insn, iext); in pt_insn_check_insn_event()
856 decoder->ip = 0ull; in pt_insn_check_insn_event()
872 decoder->ip = insn->ip + insn->size; in pt_insn_check_insn_event()
884 if (decoder->bound_paging) in pt_insn_check_insn_event()
893 decoder->bound_paging = 1; in pt_insn_check_insn_event()
895 return pt_insn_postpone(decoder, insn, iext); in pt_insn_check_insn_event()
899 if (decoder->bound_vmcs) in pt_insn_check_insn_event()
908 decoder->bound_vmcs = 1; in pt_insn_check_insn_event()
910 return pt_insn_postpone(decoder, insn, iext); in pt_insn_check_insn_event()
914 if (decoder->bound_ptwrite) in pt_insn_check_insn_event()
924 ev->variant.ptwrite.ip = decoder->ip; in pt_insn_check_insn_event()
934 if (decoder->ip != ev->variant.ptwrite.ip) in pt_insn_check_insn_event()
941 decoder->bound_ptwrite = 1; in pt_insn_check_insn_event()
943 return pt_insn_postpone(decoder, insn, iext); in pt_insn_check_insn_event()
946 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_insn_event()
965 static int handle_erratum_bdm64(struct pt_insn_decoder *decoder, in handle_erratum_bdm64() argument
972 if (!decoder || !ev || !insn || !iext) in handle_erratum_bdm64()
988 status = pt_insn_range_is_contiguous(decoder->ip, ev->variant.tsx.ip, in handle_erratum_bdm64()
989 decoder->mode, decoder->image, in handle_erratum_bdm64()
990 &decoder->asid, bdm64_max_steps); in handle_erratum_bdm64()
1000 decoder->ip = ev->variant.tsx.ip; in handle_erratum_bdm64()
1013 static inline int pt_insn_postpone_tsx(struct pt_insn_decoder *decoder, in pt_insn_postpone_tsx() argument
1020 if (!decoder || !ev) in pt_insn_postpone_tsx()
1026 if (insn && iext && decoder->query.config.errata.bdm64) { in pt_insn_postpone_tsx()
1027 status = handle_erratum_bdm64(decoder, ev, insn, iext); in pt_insn_postpone_tsx()
1032 if (decoder->ip != ev->variant.tsx.ip) in pt_insn_postpone_tsx()
1040 * Check whether an event is pending that binds to @decoder->ip, and, if that is
1046 static int pt_insn_check_ip_event(struct pt_insn_decoder *decoder, in pt_insn_check_ip_event() argument
1053 if (!decoder) in pt_insn_check_ip_event()
1056 status = event_pending(decoder); in pt_insn_check_ip_event()
1061 return pt_insn_status(decoder, 0); in pt_insn_check_ip_event()
1064 ev = &decoder->event; in pt_insn_check_ip_event()
1070 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1073 if (ev->variant.async_disabled.at != decoder->ip) in pt_insn_check_ip_event()
1076 if (decoder->query.config.errata.skd022) { in pt_insn_check_ip_event()
1079 errcode = handle_erratum_skd022(decoder); in pt_insn_check_ip_event()
1092 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1095 status = pt_insn_postpone_tsx(decoder, insn, iext, ev); in pt_insn_check_ip_event()
1103 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1106 if (ev->variant.async_branch.from != decoder->ip) in pt_insn_check_ip_event()
1109 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1112 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1116 ev->variant.exec_mode.ip != decoder->ip) in pt_insn_check_ip_event()
1119 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1122 if (decoder->enabled) in pt_insn_check_ip_event()
1125 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1129 ev->variant.async_paging.ip != decoder->ip) in pt_insn_check_ip_event()
1132 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1135 if (decoder->enabled) in pt_insn_check_ip_event()
1138 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1142 ev->variant.async_vmcs.ip != decoder->ip) in pt_insn_check_ip_event()
1145 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1148 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1151 if (!ev->ip_suppressed && decoder->enabled && in pt_insn_check_ip_event()
1152 decoder->ip != ev->variant.exstop.ip) in pt_insn_check_ip_event()
1155 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1158 if (!ev->ip_suppressed && decoder->enabled && in pt_insn_check_ip_event()
1159 decoder->ip != ev->variant.mwait.ip) in pt_insn_check_ip_event()
1162 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1166 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1179 if (decoder->enabled) in pt_insn_check_ip_event()
1182 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1187 return pt_insn_status(decoder, pts_event_pending); in pt_insn_check_ip_event()
1190 return pt_insn_status(decoder, 0); in pt_insn_check_ip_event()
1214 static int pt_insn_decode_cached(struct pt_insn_decoder *decoder, in pt_insn_decode_cached() argument
1220 if (!decoder || !insn || !iext) in pt_insn_decode_cached()
1225 * later on, fall back to decoding @insn from @decoder->image. in pt_insn_decode_cached()
1232 return pt_insn_decode(insn, iext, decoder->image, in pt_insn_decode_cached()
1233 &decoder->asid); in pt_insn_decode_cached()
1240 return pt_insn_decode(insn, iext, decoder->image, in pt_insn_decode_cached()
1241 &decoder->asid); in pt_insn_decode_cached()
1254 return pt_insn_decode(insn, iext, decoder->image, in pt_insn_decode_cached()
1255 &decoder->asid); in pt_insn_decode_cached()
1261 static int pt_insn_msec_lookup(struct pt_insn_decoder *decoder, in pt_insn_msec_lookup() argument
1269 if (!decoder || !pmsec) in pt_insn_msec_lookup()
1272 scache = &decoder->scache; in pt_insn_msec_lookup()
1273 image = decoder->image; in pt_insn_msec_lookup()
1274 ip = decoder->ip; in pt_insn_msec_lookup()
1282 &decoder->asid, ip); in pt_insn_msec_lookup()
1288 int pt_insn_next(struct pt_insn_decoder *decoder, struct pt_insn *uinsn, in pt_insn_next() argument
1296 if (!uinsn || !decoder) in pt_insn_next()
1304 if (!decoder->enabled) { in pt_insn_next()
1305 if (decoder->status & pts_eos) in pt_insn_next()
1321 if (decoder->speculative) in pt_insn_next()
1323 pinsn->ip = decoder->ip; in pt_insn_next()
1324 pinsn->mode = decoder->mode; in pt_insn_next()
1326 isid = pt_insn_msec_lookup(decoder, &msec); in pt_insn_next()
1339 status = pt_insn_decode_cached(decoder, msec, pinsn, &iext); in pt_insn_next()
1359 status = pt_insn_check_insn_event(decoder, pinsn, &iext); in pt_insn_next()
1369 status = pt_insn_proceed(decoder, pinsn, &iext); in pt_insn_next()
1378 return pt_insn_check_ip_event(decoder, pinsn, &iext); in pt_insn_next()
1381 static int pt_insn_process_enabled(struct pt_insn_decoder *decoder) in pt_insn_process_enabled() argument
1385 if (!decoder) in pt_insn_process_enabled()
1388 ev = &decoder->event; in pt_insn_process_enabled()
1399 if (decoder->enabled) in pt_insn_process_enabled()
1402 decoder->ip = ev->variant.enabled.ip; in pt_insn_process_enabled()
1403 decoder->enabled = 1; in pt_insn_process_enabled()
1408 static int pt_insn_process_disabled(struct pt_insn_decoder *decoder) in pt_insn_process_disabled() argument
1412 if (!decoder) in pt_insn_process_disabled()
1415 ev = &decoder->event; in pt_insn_process_disabled()
1422 if (!decoder->enabled) in pt_insn_process_disabled()
1425 /* We preserve @decoder->ip. This is where we expect tracing to resume in pt_insn_process_disabled()
1429 decoder->enabled = 0; in pt_insn_process_disabled()
1434 static int pt_insn_process_async_branch(struct pt_insn_decoder *decoder) in pt_insn_process_async_branch() argument
1438 if (!decoder) in pt_insn_process_async_branch()
1441 ev = &decoder->event; in pt_insn_process_async_branch()
1448 if (!decoder->enabled) in pt_insn_process_async_branch()
1451 decoder->ip = ev->variant.async_branch.to; in pt_insn_process_async_branch()
1456 static int pt_insn_process_paging(struct pt_insn_decoder *decoder) in pt_insn_process_paging() argument
1461 if (!decoder) in pt_insn_process_paging()
1464 cr3 = decoder->event.variant.paging.cr3; in pt_insn_process_paging()
1465 if (decoder->asid.cr3 != cr3) { in pt_insn_process_paging()
1466 errcode = pt_msec_cache_invalidate(&decoder->scache); in pt_insn_process_paging()
1470 decoder->asid.cr3 = cr3; in pt_insn_process_paging()
1476 static int pt_insn_process_overflow(struct pt_insn_decoder *decoder) in pt_insn_process_overflow() argument
1480 if (!decoder) in pt_insn_process_overflow()
1483 ev = &decoder->event; in pt_insn_process_overflow()
1500 decoder->enabled = 0; in pt_insn_process_overflow()
1501 decoder->ip = 0ull; in pt_insn_process_overflow()
1506 decoder->ip = ev->variant.overflow.ip; in pt_insn_process_overflow()
1507 decoder->enabled = 1; in pt_insn_process_overflow()
1516 decoder->speculative = 0; in pt_insn_process_overflow()
1521 static int pt_insn_process_exec_mode(struct pt_insn_decoder *decoder) in pt_insn_process_exec_mode() argument
1526 if (!decoder) in pt_insn_process_exec_mode()
1529 ev = &decoder->event; in pt_insn_process_exec_mode()
1533 if (ev->status_update && decoder->enabled && in pt_insn_process_exec_mode()
1534 decoder->mode != ptem_unknown && decoder->mode != mode) in pt_insn_process_exec_mode()
1537 decoder->mode = mode; in pt_insn_process_exec_mode()
1542 static int pt_insn_process_tsx(struct pt_insn_decoder *decoder) in pt_insn_process_tsx() argument
1544 if (!decoder) in pt_insn_process_tsx()
1547 decoder->speculative = decoder->event.variant.tsx.speculative; in pt_insn_process_tsx()
1552 static int pt_insn_process_stop(struct pt_insn_decoder *decoder) in pt_insn_process_stop() argument
1556 if (!decoder) in pt_insn_process_stop()
1559 ev = &decoder->event; in pt_insn_process_stop()
1566 if (decoder->enabled) in pt_insn_process_stop()
1572 static int pt_insn_process_vmcs(struct pt_insn_decoder *decoder) in pt_insn_process_vmcs() argument
1577 if (!decoder) in pt_insn_process_vmcs()
1580 vmcs = decoder->event.variant.vmcs.base; in pt_insn_process_vmcs()
1581 if (decoder->asid.vmcs != vmcs) { in pt_insn_process_vmcs()
1582 errcode = pt_msec_cache_invalidate(&decoder->scache); in pt_insn_process_vmcs()
1586 decoder->asid.vmcs = vmcs; in pt_insn_process_vmcs()
1592 int pt_insn_event(struct pt_insn_decoder *decoder, struct pt_event *uevent, in pt_insn_event() argument
1598 if (!decoder || !uevent) in pt_insn_event()
1602 if (!decoder->process_event) in pt_insn_event()
1605 ev = &decoder->event; in pt_insn_event()
1620 if (decoder->ip == ev->variant.enabled.ip) in pt_insn_event()
1623 status = pt_insn_process_enabled(decoder); in pt_insn_event()
1631 decoder->ip != ev->variant.async_disabled.at) in pt_insn_event()
1636 status = pt_insn_process_disabled(decoder); in pt_insn_event()
1643 if (decoder->ip != ev->variant.async_branch.from) in pt_insn_event()
1646 status = pt_insn_process_async_branch(decoder); in pt_insn_event()
1654 decoder->ip != ev->variant.async_paging.ip) in pt_insn_event()
1659 status = pt_insn_process_paging(decoder); in pt_insn_event()
1667 decoder->ip != ev->variant.async_vmcs.ip) in pt_insn_event()
1672 status = pt_insn_process_vmcs(decoder); in pt_insn_event()
1679 status = pt_insn_process_overflow(decoder); in pt_insn_event()
1686 status = pt_insn_process_exec_mode(decoder); in pt_insn_event()
1693 status = pt_insn_process_tsx(decoder); in pt_insn_event()
1700 status = pt_insn_process_stop(decoder); in pt_insn_event()
1707 if (!ev->ip_suppressed && decoder->enabled && in pt_insn_event()
1708 decoder->ip != ev->variant.exstop.ip) in pt_insn_event()
1714 if (!ev->ip_suppressed && decoder->enabled && in pt_insn_event()
1715 decoder->ip != ev->variant.mwait.ip) in pt_insn_event()
1741 decoder->process_event = 0; in pt_insn_event()
1749 if (decoder->process_insn) { in pt_insn_event()
1750 status = pt_insn_check_insn_event(decoder, &decoder->insn, in pt_insn_event()
1751 &decoder->iext); in pt_insn_event()
1762 status = pt_insn_proceed_postponed(decoder); in pt_insn_event()
1768 return pt_insn_check_ip_event(decoder, NULL, NULL); in pt_insn_event()