Lines Matching defs:event
150 decoder->event = NULL;
228 * not indicate the next event until the TNT cache is empty.
285 /* - an event related packet. */
704 /* There's an event ahead of us. */
708 /* Diagnose a TIP that has not been part of an event. */
712 /* Clear the decoder's current event so we know when we
713 * accidentally skipped an event.
715 decoder->event = NULL;
722 /* If we skipped an event, we're in trouble. */
723 if (decoder->event)
790 /* There's an event ahead of us. */
794 /* Clear the decoder's current event so we know when we
795 * accidentally skipped an event.
797 decoder->event = NULL;
814 /* If we skipped an event, we're in trouble. */
815 if (decoder->event)
819 * event.
855 int pt_qry_event(struct pt_query_decoder *decoder, struct pt_event *event,
860 if (!decoder || !event)
873 if (sizeof(*event) < size)
874 size = sizeof(*event);
888 * to an event.
898 /* Clear the decoder's current event so we know when decoding
899 * produces a new event.
901 decoder->event = NULL;
908 /* Check if there has been an event.
913 if (decoder->event) {
914 (void) memcpy(event, decoder->event, size);
924 /* Preserve the time at the event. */
954 static int pt_qry_event_time(struct pt_event *event,
959 if (!event || !decoder)
962 errcode = pt_time_query_tsc(&event->tsc, &event->lost_mtc,
963 &event->lost_cyc, &decoder->time);
968 event->has_tsc = 1;
1072 static int pt_qry_event_ip(uint64_t *ip, struct pt_event *event,
1085 event->ip_suppressed = 1;
1183 /* Publish the event. */
1184 decoder->event = ev;
1286 /* We send the enable event first. This is more convenient for our users
1293 /* This packet signals a standalone enabled event. */
1313 * event. If they have not, for whatever reason, discard them
1331 /* We must have an event. Either the initial enable event or one of the
1337 /* Publish the event. */
1338 decoder->event = ev;
1386 /* These events are ordered after the async disable event. It
1391 * event.
1395 * disable event. That's what our decoders do since tracing is
1431 /* This packet signals a standalone disabled event. */
1447 /* We must have an event. Either the initial enable event or one of the
1453 /* Publish the event. */
1454 decoder->event = ev;
1632 /* Publish the event. */
1633 decoder->event = ev;
1651 /* FUP indicates an async branch event; it binds to TIP.
1679 struct pt_event *event;
1690 * as an in-flight async branch event.
1692 event = pt_evq_find(&decoder->evq, evb_tip, ptev_async_branch);
1693 if (!event) {
1694 event = pt_evq_standalone(&decoder->evq);
1695 if (!event)
1697 event->type = ptev_paging;
1698 event->variant.paging.cr3 = packet.cr3;
1699 event->variant.paging.non_root = packet.nr;
1701 decoder->event = event;
1703 event = pt_evq_enqueue(&decoder->evq, evb_tip);
1704 if (!event)
1707 event->type = ptev_async_paging;
1708 event->variant.async_paging.cr3 = packet.cr3;
1709 event->variant.async_paging.non_root = packet.nr;
1712 errcode = pt_qry_event_time(event, decoder);
1723 struct pt_event *event;
1734 event = pt_evq_enqueue(&decoder->evq, evb_psbend);
1735 if (!event)
1738 event->type = ptev_async_paging;
1739 event->variant.async_paging.cr3 = packet.cr3;
1740 event->variant.async_paging.non_root = packet.nr;
1809 /* Publish the event. */
1810 decoder->event = ev;
1812 /* Signal a pending event. */
1816 /* Create a standalone overflow event with tracing disabled.
1818 * Creates and published the event and disables tracing in @decoder.
1842 decoder->event = ev;
1847 /* Queues an overflow event with tracing enabled.
1849 * Creates and enqueues the event and enables tracing in @decoder.
1873 * Creates and publishes an overflow event at @packet's IP payload.
1904 /* Synthesize the overflow event. */
1926 /* Publish the event. */
1927 decoder->event = ev;
1934 * Creates and publishes a standalone overflow event.
2052 * events after the overflow event when recovering from
2078 * We'd need to synthesize the MODE.EXEC event
2079 * after the overflow event when recovering at
2378 * Any event will be dropped.
2523 * on CBR but drop the event.
2567 * Any event will be dropped.
2705 * on CBR but drop the event.
2928 struct pt_event *event;
2934 event = pt_evq_enqueue(&decoder->evq, evb_tip);
2935 if (!event)
2938 event->type = ptev_exec_mode;
2939 event->variant.exec_mode.mode = pt_get_exec_mode(packet);
2941 return pt_qry_event_time(event, decoder);
2947 struct pt_event *event;
2954 event = pt_evq_standalone(&decoder->evq);
2955 if (!event)
2959 event->variant.tsx.ip = 0;
2960 event->ip_suppressed = 1;
2962 /* Publish the event. */
2963 decoder->event = event;
2966 event = pt_evq_enqueue(&decoder->evq, evb_fup);
2967 if (!event)
2971 event->type = ptev_tsx;
2972 event->variant.tsx.speculative = packet->intx;
2973 event->variant.tsx.aborted = packet->abrt;
2975 return pt_qry_event_time(event, decoder);
3011 struct pt_event *event;
3022 event = pt_evq_enqueue(&decoder->evq, evb_psbend);
3023 if (!event)
3028 event->type = ptev_exec_mode;
3029 event->variant.exec_mode.mode =
3034 event->type = ptev_tsx;
3035 event->variant.tsx.speculative = packet.bits.tsx.intx;
3036 event->variant.tsx.aborted = packet.bits.tsx.abrt;
3111 struct pt_event *event;
3126 event = pt_evq_standalone(&decoder->evq);
3127 if (!event)
3130 event->type = ptev_cbr;
3131 event->variant.cbr.ratio = packet.ratio;
3133 decoder->event = event;
3135 errcode = pt_qry_event_time(event, decoder);
3146 struct pt_event *event;
3161 event = pt_evq_enqueue(&decoder->evq, evb_psbend);
3162 if (!event)
3165 event->type = ptev_cbr;
3166 event->variant.cbr.ratio = packet.ratio;
3294 struct pt_event *event;
3301 event = pt_evq_standalone(&decoder->evq);
3302 if (!event)
3305 event->type = ptev_stop;
3307 decoder->event = event;
3309 errcode = pt_qry_event_time(event, decoder);
3320 struct pt_event *event;
3330 event = pt_evq_enqueue(&decoder->evq, evb_psbend);
3331 if (!event)
3334 event->type = ptev_async_vmcs;
3335 event->variant.async_vmcs.base = packet.base;
3344 struct pt_event *event;
3354 /* VMCS events bind to the same IP as an in-flight async paging event.
3356 * In that case, the VMCS event should be applied first. We reorder
3359 event = pt_evq_find(&decoder->evq, evb_tip, ptev_async_paging);
3360 if (event) {
3367 *paging = *event;
3369 event->type = ptev_async_vmcs;
3370 event->variant.async_vmcs.base = packet.base;
3377 * branch event.
3379 event = pt_evq_find(&decoder->evq, evb_tip, ptev_async_branch);
3380 if (event) {
3381 event = pt_evq_enqueue(&decoder->evq, evb_tip);
3382 if (!event)
3385 event->type = ptev_async_vmcs;
3386 event->variant.async_vmcs.base = packet.base;
3392 /* VMCS events that do not bind to an in-flight async event are
3395 event = pt_evq_standalone(&decoder->evq);
3396 if (!event)
3399 event->type = ptev_vmcs;
3400 event->variant.vmcs.base = packet.base;
3402 decoder->event = event;
3404 errcode = pt_qry_event_time(event, decoder);
3415 struct pt_event *event;
3425 event = pt_evq_standalone(&decoder->evq);
3426 if (!event)
3429 event->type = ptev_mnt;
3430 event->variant.mnt.payload = packet.payload;
3432 decoder->event = event;
3434 errcode = pt_qry_event_time(event, decoder);
3446 struct pt_event *event;
3456 event = pt_evq_enqueue(&decoder->evq, evb_psbend);
3457 if (!event)
3460 event->type = ptev_mnt;
3461 event->variant.mnt.payload = packet.payload;
3471 struct pt_event *event;
3482 event = pt_evq_enqueue(&decoder->evq, evb_fup);
3483 if (!event)
3486 event->type = ptev_exstop;
3488 event = pt_evq_standalone(&decoder->evq);
3489 if (!event)
3492 event->type = ptev_exstop;
3494 event->ip_suppressed = 1;
3495 event->variant.exstop.ip = 0ull;
3497 decoder->event = event;
3507 struct pt_event *event;
3517 event = pt_evq_enqueue(&decoder->evq, evb_fup);
3518 if (!event)
3521 event->type = ptev_mwait;
3522 event->variant.mwait.hints = packet.hints;
3523 event->variant.mwait.ext = packet.ext;
3532 struct pt_event *event;
3542 event = pt_evq_standalone(&decoder->evq);
3543 if (!event)
3546 event->type = ptev_pwre;
3547 event->variant.pwre.state = packet.state;
3548 event->variant.pwre.sub_state = packet.sub_state;
3551 event->variant.pwre.hw = 1;
3553 decoder->event = event;
3562 struct pt_event *event;
3572 event = pt_evq_standalone(&decoder->evq);
3573 if (!event)
3576 event->type = ptev_pwrx;
3577 event->variant.pwrx.last = packet.last;
3578 event->variant.pwrx.deepest = packet.deepest;
3581 event->variant.pwrx.interrupt = 1;
3583 event->variant.pwrx.store = 1;
3585 event->variant.pwrx.autonomous = 1;
3587 decoder->event = event;
3596 struct pt_event *event;
3611 event = pt_evq_enqueue(&decoder->evq, evb_fup);
3612 if (!event)
3615 event = pt_evq_standalone(&decoder->evq);
3616 if (!event)
3619 event->ip_suppressed = 1;
3621 decoder->event = event;
3624 event->type = ptev_ptwrite;
3625 event->variant.ptwrite.size = (uint8_t) pls;
3626 event->variant.ptwrite.payload = packet.payload;