diff options
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap.c | 8 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dev.c | 10 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dmabuf.c | 2 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_handle.c | 4 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_heap.c | 2 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_ioctl.c | 2 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_iommu.c | 2 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_mru.c | 2 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_mru.h | 2 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_priv.h (renamed from drivers/video/tegra/nvmap/nvmap.h) | 0 | ||||
-rw-r--r-- | include/trace/events/nvmap.h | 40 |
11 files changed, 43 insertions, 31 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c index 9ff3d243fdda..e0e75431d856 100644 --- a/drivers/video/tegra/nvmap/nvmap.c +++ b/drivers/video/tegra/nvmap/nvmap.c @@ -35,7 +35,7 @@ #include <linux/nvmap.h> #include <trace/events/nvmap.h> -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_mru.h" #include "nvmap_common.h" @@ -94,7 +94,7 @@ static int pin_locked(struct nvmap_client *client, struct nvmap_handle *h) h->pgalloc.area = area; } } - trace_handle_pin(client, h, atomic_read(&h->pin)); + trace_handle_pin(client, client->name, h, atomic_read(&h->pin)); return 0; } @@ -107,7 +107,7 @@ static int handle_unpin(struct nvmap_client *client, nvmap_mru_lock(client->share); if (atomic_read(&h->pin) == 0) { - trace_handle_unpin_error(client, h, atomic_read(&h->pin)); + trace_handle_unpin_error(client, client->name, h, atomic_read(&h->pin)); nvmap_err(client, "%s unpinning unpinned handle %p\n", current->group_leader->comm, h); nvmap_mru_unlock(client->share); @@ -133,7 +133,7 @@ static int handle_unpin(struct nvmap_client *client, } } - trace_handle_unpin(client, h, atomic_read(&h->pin)); + trace_handle_unpin(client, client->name, h, atomic_read(&h->pin)); nvmap_mru_unlock(client->share); nvmap_handle_put(h); return ret; diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index 7aeb0fa13e2d..37f21fd76ed2 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -45,7 +45,7 @@ #define CREATE_TRACE_POINTS #include <trace/events/nvmap.h> -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_ioctl.h" #include "nvmap_mru.h" #include "nvmap_common.h" @@ -661,7 +661,7 @@ static int nvmap_open(struct inode *inode, struct file *filp) priv = nvmap_create_client(dev, "user"); if (!priv) return -ENOMEM; - trace_nvmap_open(priv); + trace_nvmap_open(priv, priv->name); priv->super = (filp->f_op == &nvmap_super_fops); @@ -673,8 +673,10 @@ static int nvmap_open(struct inode *inode, struct file *filp) static int nvmap_release(struct inode *inode, struct file *filp) { - trace_nvmap_release(filp->private_data); - nvmap_client_put(filp->private_data); + struct nvmap_client *priv = filp->private_data; + + trace_nvmap_release(priv, priv->name); + nvmap_client_put(priv); return 0; } diff --git a/drivers/video/tegra/nvmap/nvmap_dmabuf.c b/drivers/video/tegra/nvmap/nvmap_dmabuf.c index 1e671283f4e4..39f1cd738539 100644 --- a/drivers/video/tegra/nvmap/nvmap_dmabuf.c +++ b/drivers/video/tegra/nvmap/nvmap_dmabuf.c @@ -23,7 +23,7 @@ #include <linux/nvmap.h> #include <linux/dma-buf.h> -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_ioctl.h" struct nvmap_handle_info { diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c index 10cb94765d9c..369966e1d296 100644 --- a/drivers/video/tegra/nvmap/nvmap_handle.c +++ b/drivers/video/tegra/nvmap/nvmap_handle.c @@ -43,7 +43,7 @@ #include <mach/iovmm.h> #include <trace/events/nvmap.h> -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_mru.h" #include "nvmap_common.h" @@ -1005,7 +1005,7 @@ struct nvmap_handle_ref *nvmap_create_handle(struct nvmap_client *client, ref->handle = h; atomic_set(&ref->pin, 0); add_handle_ref(client, ref); - trace_nvmap_create_handle(client, h, size, ref); + trace_nvmap_create_handle(client, client->name, h, size, ref); return ref; } diff --git a/drivers/video/tegra/nvmap/nvmap_heap.c b/drivers/video/tegra/nvmap/nvmap_heap.c index 4dcde4126f4a..abd181511ca3 100644 --- a/drivers/video/tegra/nvmap/nvmap_heap.c +++ b/drivers/video/tegra/nvmap/nvmap_heap.c @@ -30,7 +30,7 @@ #include <linux/err.h> #include <linux/nvmap.h> -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_heap.h" #include "nvmap_common.h" diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c index 1b3227af27f6..e4171710472b 100644 --- a/drivers/video/tegra/nvmap/nvmap_ioctl.c +++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c @@ -39,7 +39,7 @@ #include <linux/vmalloc.h> #include "nvmap_ioctl.h" -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_common.h" #include <linux/list.h> diff --git a/drivers/video/tegra/nvmap/nvmap_iommu.c b/drivers/video/tegra/nvmap/nvmap_iommu.c index 2eec0f2d06cf..0feed2c788a9 100644 --- a/drivers/video/tegra/nvmap/nvmap_iommu.c +++ b/drivers/video/tegra/nvmap/nvmap_iommu.c @@ -20,7 +20,7 @@ #include <linux/slab.h> #include <mach/iovmm.h> -#include "nvmap.h" +#include "nvmap_priv.h" /* HACK: This should come from DT */ #include "../../../../arch/arm/mach-tegra/iomap.h" diff --git a/drivers/video/tegra/nvmap/nvmap_mru.c b/drivers/video/tegra/nvmap/nvmap_mru.c index f54d44923ebf..fa3ae2fff259 100644 --- a/drivers/video/tegra/nvmap/nvmap_mru.c +++ b/drivers/video/tegra/nvmap/nvmap_mru.c @@ -27,7 +27,7 @@ #include <mach/iovmm.h> -#include "nvmap.h" +#include "nvmap_priv.h" #include "nvmap_mru.h" /* if IOVMM reclamation is enabled (CONFIG_NVMAP_RECLAIM_UNPINNED_VM), diff --git a/drivers/video/tegra/nvmap/nvmap_mru.h b/drivers/video/tegra/nvmap/nvmap_mru.h index 6c94630bc3ef..e4958ab62906 100644 --- a/drivers/video/tegra/nvmap/nvmap_mru.h +++ b/drivers/video/tegra/nvmap/nvmap_mru.h @@ -26,7 +26,7 @@ #include <linux/spinlock.h> -#include "nvmap.h" +#include "nvmap_priv.h" struct tegra_iovmm_area; struct tegra_iovmm_client; diff --git a/drivers/video/tegra/nvmap/nvmap.h b/drivers/video/tegra/nvmap/nvmap_priv.h index 2b65f3beb9c5..2b65f3beb9c5 100644 --- a/drivers/video/tegra/nvmap/nvmap.h +++ b/drivers/video/tegra/nvmap/nvmap_priv.h diff --git a/include/trace/events/nvmap.h b/include/trace/events/nvmap.h index 3ee2f5dcdcdd..6e4807af1979 100644 --- a/include/trace/events/nvmap.h +++ b/include/trace/events/nvmap.h @@ -26,44 +26,47 @@ #if !defined(_TRACE_NVMAP_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_NVMAP_H -#include "../../../drivers/video/tegra/nvmap/nvmap.h" #include <linux/nvmap.h> #include <linux/tracepoint.h> DECLARE_EVENT_CLASS(nvmap, - TP_PROTO(struct nvmap_client *client), - TP_ARGS(client), + TP_PROTO(struct nvmap_client *client, const char *name), + TP_ARGS(client, name), TP_STRUCT__entry( __field(struct nvmap_client *, client) + __string(sname, name) ), TP_fast_assign( __entry->client = client; + __assign_str(sname, name) ), TP_printk("client=%p, name=%s", - __entry->client, __entry->client->name) + __entry->client, __get_str(sname)) ); DEFINE_EVENT(nvmap, nvmap_open, - TP_PROTO(struct nvmap_client *client), - TP_ARGS(client) + TP_PROTO(struct nvmap_client *client, const char *name), + TP_ARGS(client, name) ); DEFINE_EVENT(nvmap, nvmap_release, - TP_PROTO(struct nvmap_client *client), - TP_ARGS(client) + TP_PROTO(struct nvmap_client *client, const char *name), + TP_ARGS(client, name) ); TRACE_EVENT(nvmap_create_handle, TP_PROTO(struct nvmap_client *client, + const char *name, struct nvmap_handle *h, u32 size, struct nvmap_handle_ref *ref ), - TP_ARGS(client, h, size, ref), + TP_ARGS(client, name, h, size, ref), TP_STRUCT__entry( __field(struct nvmap_client *, client) + __string(sname, name) __field(struct nvmap_handle *, h) __field(u32, size) __field(struct nvmap_handle_ref *, ref) @@ -71,13 +74,14 @@ TRACE_EVENT(nvmap_create_handle, TP_fast_assign( __entry->client = client; + __assign_str(sname, name) __entry->h = h; __entry->size = size; __entry->ref = ref; ), TP_printk("client=%p, name=%s, handle=%p, size=%d, ref=%p", - __entry->client, __entry->client->name, + __entry->client, __get_str(sname), __entry->h, __entry->size, __entry->ref) ); @@ -300,51 +304,57 @@ TRACE_EVENT(nvmap_ioctl_pinop, DECLARE_EVENT_CLASS(pin_unpin, TP_PROTO(struct nvmap_client *client, + const char *name, struct nvmap_handle *h, u32 pin_count ), - TP_ARGS(client, h, pin_count), + TP_ARGS(client, name, h, pin_count), TP_STRUCT__entry( __field(struct nvmap_client *, client) + __string(sname, name) __field(struct nvmap_handle *, h) __field(u32, pin_count) ), TP_fast_assign( __entry->client = client; + __assign_str(sname, name) __entry->h = h; __entry->pin_count = pin_count; ), TP_printk("client=%p, name=%s, h=%p, pin_count=%d", - __entry->client, __entry->client->name, + __entry->client, __get_str(sname), __entry->h, __entry->pin_count) ); DEFINE_EVENT(pin_unpin, handle_pin, TP_PROTO(struct nvmap_client *client, + const char *name, struct nvmap_handle *h, u32 pin_count ), - TP_ARGS(client, h, pin_count) + TP_ARGS(client, name, h, pin_count) ); DEFINE_EVENT(pin_unpin, handle_unpin, TP_PROTO(struct nvmap_client *client, + const char *name, struct nvmap_handle *h, u32 pin_count ), - TP_ARGS(client, h, pin_count) + TP_ARGS(client, name, h, pin_count) ); DEFINE_EVENT(pin_unpin, handle_unpin_error, TP_PROTO(struct nvmap_client *client, + const char *name, struct nvmap_handle *h, u32 pin_count ), - TP_ARGS(client, h, pin_count) + TP_ARGS(client, name, h, pin_count) ); #endif /* _TRACE_NVMAP_H */ |