diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_trace.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_trace.h | 69 |
1 files changed, 43 insertions, 26 deletions
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index 751d4ad14d62..6058a01b4443 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h | |||
@@ -328,8 +328,8 @@ TRACE_EVENT(i915_gem_evict_vm, | |||
328 | TRACE_EVENT(i915_gem_ring_sync_to, | 328 | TRACE_EVENT(i915_gem_ring_sync_to, |
329 | TP_PROTO(struct intel_engine_cs *from, | 329 | TP_PROTO(struct intel_engine_cs *from, |
330 | struct intel_engine_cs *to, | 330 | struct intel_engine_cs *to, |
331 | u32 seqno), | 331 | struct drm_i915_gem_request *req), |
332 | TP_ARGS(from, to, seqno), | 332 | TP_ARGS(from, to, req), |
333 | 333 | ||
334 | TP_STRUCT__entry( | 334 | TP_STRUCT__entry( |
335 | __field(u32, dev) | 335 | __field(u32, dev) |
@@ -342,7 +342,7 @@ TRACE_EVENT(i915_gem_ring_sync_to, | |||
342 | __entry->dev = from->dev->primary->index; | 342 | __entry->dev = from->dev->primary->index; |
343 | __entry->sync_from = from->id; | 343 | __entry->sync_from = from->id; |
344 | __entry->sync_to = to->id; | 344 | __entry->sync_to = to->id; |
345 | __entry->seqno = seqno; | 345 | __entry->seqno = i915_gem_request_get_seqno(req); |
346 | ), | 346 | ), |
347 | 347 | ||
348 | TP_printk("dev=%u, sync-from=%u, sync-to=%u, seqno=%u", | 348 | TP_printk("dev=%u, sync-from=%u, sync-to=%u, seqno=%u", |
@@ -352,8 +352,8 @@ TRACE_EVENT(i915_gem_ring_sync_to, | |||
352 | ); | 352 | ); |
353 | 353 | ||
354 | TRACE_EVENT(i915_gem_ring_dispatch, | 354 | TRACE_EVENT(i915_gem_ring_dispatch, |
355 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno, u32 flags), | 355 | TP_PROTO(struct drm_i915_gem_request *req, u32 flags), |
356 | TP_ARGS(ring, seqno, flags), | 356 | TP_ARGS(req, flags), |
357 | 357 | ||
358 | TP_STRUCT__entry( | 358 | TP_STRUCT__entry( |
359 | __field(u32, dev) | 359 | __field(u32, dev) |
@@ -363,11 +363,13 @@ TRACE_EVENT(i915_gem_ring_dispatch, | |||
363 | ), | 363 | ), |
364 | 364 | ||
365 | TP_fast_assign( | 365 | TP_fast_assign( |
366 | struct intel_engine_cs *ring = | ||
367 | i915_gem_request_get_ring(req); | ||
366 | __entry->dev = ring->dev->primary->index; | 368 | __entry->dev = ring->dev->primary->index; |
367 | __entry->ring = ring->id; | 369 | __entry->ring = ring->id; |
368 | __entry->seqno = seqno; | 370 | __entry->seqno = i915_gem_request_get_seqno(req); |
369 | __entry->flags = flags; | 371 | __entry->flags = flags; |
370 | i915_trace_irq_get(ring, seqno); | 372 | i915_trace_irq_get(ring, req); |
371 | ), | 373 | ), |
372 | 374 | ||
373 | TP_printk("dev=%u, ring=%u, seqno=%u, flags=%x", | 375 | TP_printk("dev=%u, ring=%u, seqno=%u, flags=%x", |
@@ -398,31 +400,36 @@ TRACE_EVENT(i915_gem_ring_flush, | |||
398 | ); | 400 | ); |
399 | 401 | ||
400 | DECLARE_EVENT_CLASS(i915_gem_request, | 402 | DECLARE_EVENT_CLASS(i915_gem_request, |
401 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), | 403 | TP_PROTO(struct drm_i915_gem_request *req), |
402 | TP_ARGS(ring, seqno), | 404 | TP_ARGS(req), |
403 | 405 | ||
404 | TP_STRUCT__entry( | 406 | TP_STRUCT__entry( |
405 | __field(u32, dev) | 407 | __field(u32, dev) |
406 | __field(u32, ring) | 408 | __field(u32, ring) |
409 | __field(u32, uniq) | ||
407 | __field(u32, seqno) | 410 | __field(u32, seqno) |
408 | ), | 411 | ), |
409 | 412 | ||
410 | TP_fast_assign( | 413 | TP_fast_assign( |
414 | struct intel_engine_cs *ring = | ||
415 | i915_gem_request_get_ring(req); | ||
411 | __entry->dev = ring->dev->primary->index; | 416 | __entry->dev = ring->dev->primary->index; |
412 | __entry->ring = ring->id; | 417 | __entry->ring = ring->id; |
413 | __entry->seqno = seqno; | 418 | __entry->uniq = req ? req->uniq : 0; |
419 | __entry->seqno = i915_gem_request_get_seqno(req); | ||
414 | ), | 420 | ), |
415 | 421 | ||
416 | TP_printk("dev=%u, ring=%u, seqno=%u", | 422 | TP_printk("dev=%u, ring=%u, uniq=%u, seqno=%u", |
417 | __entry->dev, __entry->ring, __entry->seqno) | 423 | __entry->dev, __entry->ring, __entry->uniq, |
424 | __entry->seqno) | ||
418 | ); | 425 | ); |
419 | 426 | ||
420 | DEFINE_EVENT(i915_gem_request, i915_gem_request_add, | 427 | DEFINE_EVENT(i915_gem_request, i915_gem_request_add, |
421 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), | 428 | TP_PROTO(struct drm_i915_gem_request *req), |
422 | TP_ARGS(ring, seqno) | 429 | TP_ARGS(req) |
423 | ); | 430 | ); |
424 | 431 | ||
425 | TRACE_EVENT(i915_gem_request_complete, | 432 | TRACE_EVENT(i915_gem_request_notify, |
426 | TP_PROTO(struct intel_engine_cs *ring), | 433 | TP_PROTO(struct intel_engine_cs *ring), |
427 | TP_ARGS(ring), | 434 | TP_ARGS(ring), |
428 | 435 | ||
@@ -443,17 +450,23 @@ TRACE_EVENT(i915_gem_request_complete, | |||
443 | ); | 450 | ); |
444 | 451 | ||
445 | DEFINE_EVENT(i915_gem_request, i915_gem_request_retire, | 452 | DEFINE_EVENT(i915_gem_request, i915_gem_request_retire, |
446 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), | 453 | TP_PROTO(struct drm_i915_gem_request *req), |
447 | TP_ARGS(ring, seqno) | 454 | TP_ARGS(req) |
455 | ); | ||
456 | |||
457 | DEFINE_EVENT(i915_gem_request, i915_gem_request_complete, | ||
458 | TP_PROTO(struct drm_i915_gem_request *req), | ||
459 | TP_ARGS(req) | ||
448 | ); | 460 | ); |
449 | 461 | ||
450 | TRACE_EVENT(i915_gem_request_wait_begin, | 462 | TRACE_EVENT(i915_gem_request_wait_begin, |
451 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), | 463 | TP_PROTO(struct drm_i915_gem_request *req), |
452 | TP_ARGS(ring, seqno), | 464 | TP_ARGS(req), |
453 | 465 | ||
454 | TP_STRUCT__entry( | 466 | TP_STRUCT__entry( |
455 | __field(u32, dev) | 467 | __field(u32, dev) |
456 | __field(u32, ring) | 468 | __field(u32, ring) |
469 | __field(u32, uniq) | ||
457 | __field(u32, seqno) | 470 | __field(u32, seqno) |
458 | __field(bool, blocking) | 471 | __field(bool, blocking) |
459 | ), | 472 | ), |
@@ -465,20 +478,24 @@ TRACE_EVENT(i915_gem_request_wait_begin, | |||
465 | * less desirable. | 478 | * less desirable. |
466 | */ | 479 | */ |
467 | TP_fast_assign( | 480 | TP_fast_assign( |
481 | struct intel_engine_cs *ring = | ||
482 | i915_gem_request_get_ring(req); | ||
468 | __entry->dev = ring->dev->primary->index; | 483 | __entry->dev = ring->dev->primary->index; |
469 | __entry->ring = ring->id; | 484 | __entry->ring = ring->id; |
470 | __entry->seqno = seqno; | 485 | __entry->uniq = req ? req->uniq : 0; |
471 | __entry->blocking = mutex_is_locked(&ring->dev->struct_mutex); | 486 | __entry->seqno = i915_gem_request_get_seqno(req); |
487 | __entry->blocking = | ||
488 | mutex_is_locked(&ring->dev->struct_mutex); | ||
472 | ), | 489 | ), |
473 | 490 | ||
474 | TP_printk("dev=%u, ring=%u, seqno=%u, blocking=%s", | 491 | TP_printk("dev=%u, ring=%u, uniq=%u, seqno=%u, blocking=%s", |
475 | __entry->dev, __entry->ring, __entry->seqno, | 492 | __entry->dev, __entry->ring, __entry->uniq, |
476 | __entry->blocking ? "yes (NB)" : "no") | 493 | __entry->seqno, __entry->blocking ? "yes (NB)" : "no") |
477 | ); | 494 | ); |
478 | 495 | ||
479 | DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_end, | 496 | DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_end, |
480 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), | 497 | TP_PROTO(struct drm_i915_gem_request *req), |
481 | TP_ARGS(ring, seqno) | 498 | TP_ARGS(req) |
482 | ); | 499 | ); |
483 | 500 | ||
484 | DECLARE_EVENT_CLASS(i915_ring, | 501 | DECLARE_EVENT_CLASS(i915_ring, |