Hi,

Lu Baolu <baolu...@linux.intel.com> writes:
> Hi,
>
> On 12/30/2016 03:47 PM, Felipe Balbi wrote:
>> Hi,
>>
>> Lu Baolu <baolu...@linux.intel.com> writes:
>>>> +DEFINE_EVENT(xhci_log_trb, xhci_handle_event,
>>>> +  TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
>>>> +  TP_ARGS(ring, trb)
>>>> +);
>>>> +
>>>> +DEFINE_EVENT(xhci_log_trb, xhci_handle_command,
>>>> +  TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
>>>> +  TP_ARGS(ring, trb)
>>>> +);
>>>> +
>>>> +DEFINE_EVENT(xhci_log_trb, xhci_handle_transfer,
>>>> +  TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
>>>> +  TP_ARGS(ring, trb)
>>>> +);
>>>> +
>>>> +DEFINE_EVENT(xhci_log_trb, xhci_queue_trb,
>>>> +  TP_PROTO(struct xhci_ring *ring, struct xhci_generic_trb *trb),
>>>> +  TP_ARGS(ring, trb)
>>>>  );
>>> How about add xhci_dequeue_trb for those dequeued from event ring?
>> Sure, and where would the tracer be? When do we "dequeue" TRBs?
>
> How about xhci_handle_event()? TRBs are dequeued from the event
> ring there.

we already have a tracer there ;-)

@@ -2475,6 +2480,8 @@ static int xhci_handle_event(struct xhci_hcd *xhci)
            xhci->event_ring->cycle_state)
                return 0;
 
+       trace_xhci_handle_event(xhci->event_ring, &event->generic);
+
        /*
         * Barrier between reading the TRB_CYCLE (valid) flag above and any
         * speculative reads of the event's flags/data below.

We also have one for cmd completion:

@@ -1346,6 +1346,9 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
 
        cmd_dma = le64_to_cpu(event->cmd_trb);
        cmd_trb = xhci->cmd_ring->dequeue;
+
+       trace_xhci_handle_command(xhci->cmd_ring, &cmd_trb->generic);
+
        cmd_dequeue_dma = xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg,
                        cmd_trb);
        /*

and another for transfer completion:

@@ -2475,6 +2480,8 @@ static int xhci_handle_event(struct xhci_hcd *xhci)
            xhci->event_ring->cycle_state)
                return 0;
 
+       trace_xhci_handle_event(xhci->event_ring, &event->generic);
+
        /*
         * Barrier between reading the TRB_CYCLE (valid) flag above and any
         * speculative reads of the event's flags/data below.


I can't see what we're missing here.

-- 
balbi

Attachment: signature.asc
Description: PGP signature

Reply via email to