Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1318956

[PATCH v2 10/11] dma-buf/sync_file: bring debug back to sync file

From Gustavo Padovan <gustavo@padovan.org>
Newsgroups linux.kernel
Subject [PATCH v2 10/11] dma-buf/sync_file: bring debug back to sync file
Date 2016-01-27 14:40 +0100
Message-ID <qVyug-49M-45@gated-at.bofh.it> (permalink)
References <qVyue-49M-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Enable reports of sync_files through <debugfs>/sync/info

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/dma-buf/sync_file.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index 92474dd..aa1215d 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -29,6 +29,8 @@
 #define CREATE_TRACE_POINTS
 #include <trace/events/sync_file.h>
 
+#include "sync_debug.h"
+
 static const struct file_operations sync_file_fops;
 
 static struct sync_file *sync_file_alloc(int size, const char *name)
@@ -87,6 +89,8 @@ struct sync_file *sync_file_create(const char *name, struct fence *fence)
 			       fence_check_cb_func))
 		atomic_dec(&sync_file->status);
 
+	sync_file_debug_add(sync_file);
+
 	return sync_file;
 }
 EXPORT_SYMBOL(sync_file_create);
@@ -188,6 +192,7 @@ struct sync_file *sync_file_merge(const char *name,
 		atomic_sub(num_fences - i, &sync_file->status);
 	sync_file->num_fences = i;
 
+	sync_file_debug_add(sync_file);
 	return sync_file;
 }
 EXPORT_SYMBOL(sync_file_merge);
@@ -246,6 +251,8 @@ static int sync_file_release(struct inode *inode, struct file *file)
 {
 	struct sync_file *sync_file = file->private_data;
 
+	sync_file_debug_remove(sync_file);
+
 	kref_put(&sync_file->kref, sync_file_free);
 	return 0;
 }
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/11] sync framework de-staging: part 2 - de-stage Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 08/11] staging/android: rename android_fence to timeline_fence Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 09/11] dma-buf/sync_timeline: de-stage sync_timeline Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 10/11] dma-buf/sync_file: bring debug back to sync file Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 02/11] staging/android: store last signaled value on sync timeline Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 06/11] staging/android: remove sw_sync_timeline and sw_sync_pt Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 05/11] staging/android: remove struct sync_timeline_ops Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 11/11] dma-buf/sync_file: bring sync_dump() back Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 07/11] staging/android: remove sw_sync.[ch] files Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100
  [PATCH v2 03/11] staging/android: remove .fill_driver_data() timeline ops Gustavo Padovan <gustavo@padovan.org> - 2016-01-27 14:40 +0100

csiph-web