diff options
author | Erik Gilling <konkers@android.com> | 2013-03-01 00:43:23 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-04 09:46:55 (GMT) |
commit | b699a644f82110e8e5a0f9b45ee1d3a3cd3e4586 (patch) | |
tree | 307415bd622403c6aaea806bbdb4c0c37a30da8a /drivers/staging/android/sync.c | |
parent | 135114a566c15dfe44fb8ca31e42dd215d627383 (diff) | |
download | linux-fsl-qoriq-b699a644f82110e8e5a0f9b45ee1d3a3cd3e4586.tar.xz |
staging: sync: Add tracepoint support
Add support for tracepoints
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robclark@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Erik Gilling <konkers@android.com>
[jstultz: Whitespace changes, add commit message, move to staging]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/sync.c')
-rw-r--r-- | drivers/staging/android/sync.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index 988f233..1ddc404 100644 --- a/drivers/staging/android/sync.c +++ b/drivers/staging/android/sync.c @@ -28,6 +28,9 @@ #include "sync.h" +#define CREATE_TRACE_POINTS +#include "trace/sync.h" + static void sync_fence_signal_pt(struct sync_pt *pt); static int _sync_pt_has_signaled(struct sync_pt *pt); static void sync_fence_free(struct kref *kref); @@ -134,6 +137,8 @@ void sync_timeline_signal(struct sync_timeline *obj) LIST_HEAD(signaled_pts); struct list_head *pos, *n; + trace_sync_timeline(obj); + spin_lock_irqsave(&obj->active_list_lock, flags); list_for_each_safe(pos, n, &obj->active_list_head) { @@ -581,6 +586,11 @@ static bool sync_fence_check(struct sync_fence *fence) int sync_fence_wait(struct sync_fence *fence, long timeout) { int err = 0; + struct sync_pt *pt; + + trace_sync_wait(fence, 1); + list_for_each_entry(pt, &fence->pt_list_head, pt_list) + trace_sync_pt(pt); if (timeout > 0) { timeout = msecs_to_jiffies(timeout); @@ -591,6 +601,7 @@ int sync_fence_wait(struct sync_fence *fence, long timeout) err = wait_event_interruptible(fence->wq, sync_fence_check(fence)); } + trace_sync_wait(fence, 0); if (err < 0) return err; |