diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-07-26 14:09:02 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:17 -0800 |
commit | 7269592fe51dfca0a7d251f00a35dc5eb65c261b (patch) | |
tree | 25ea3d8c6125eb8c5cdfe45579b8af0ab6a00b3e /include/trace | |
parent | e0a4cc70f6dbb23b5a3656f41e90ebe561fd0585 (diff) |
nvhost: Move include files to kernel/include
To prepare for kernel modularization, nvhost include files need to be
moved from mach-tegra/include to kernel/include. At the same time
user space specific part is split into nvhost_ioctl.h.
Bug 854182
Original-Change-Id: I3694a40d786028733310ecf5b59341282af571be
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/43211
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rc4fadf65d59ddfb5bb924e7adfccd39e86a0b2c7
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/nvhost.h | 350 |
1 files changed, 350 insertions, 0 deletions
diff --git a/include/trace/events/nvhost.h b/include/trace/events/nvhost.h new file mode 100644 index 000000000000..2a1845950ed5 --- /dev/null +++ b/include/trace/events/nvhost.h @@ -0,0 +1,350 @@ +/* + * include/trace/events/nvhost.h + * + * Nvhost event logging to ftrace. + * + * Copyright (c) 2010-2011, NVIDIA Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM nvhost + +#if !defined(_TRACE_NVHOST_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_NVHOST_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS(nvhost, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry(__field(const char *, name)), + TP_fast_assign(__entry->name = name;), + TP_printk("name=%s", __entry->name) +); + +DEFINE_EVENT(nvhost, nvhost_channel_open, + TP_PROTO(const char *name), + TP_ARGS(name) +); + +DEFINE_EVENT(nvhost, nvhost_channel_release, + TP_PROTO(const char *name), + TP_ARGS(name) +); + +DEFINE_EVENT(nvhost, nvhost_ioctl_channel_flush, + TP_PROTO(const char *name), + TP_ARGS(name) +); + +TRACE_EVENT(nvhost_channel_write_submit, + TP_PROTO(const char *name, ssize_t count, u32 cmdbufs, u32 relocs), + + TP_ARGS(name, count, cmdbufs, relocs), + + TP_STRUCT__entry( + __field(const char *, name) + __field(ssize_t, count) + __field(u32, cmdbufs) + __field(u32, relocs) + ), + + TP_fast_assign( + __entry->name = name; + __entry->count = count; + __entry->cmdbufs = cmdbufs; + __entry->relocs = relocs; + ), + + TP_printk("name=%s, count=%lu, cmdbufs=%lu, relocs=%ld", + __entry->name, (unsigned long)__entry->count, + (unsigned long)__entry->cmdbufs, (unsigned long)__entry->relocs) +); + +TRACE_EVENT(nvhost_ioctl_channel_submit, + TP_PROTO(const char *name, u32 version, u32 cmdbufs, u32 relocs, + u32 waitchks), + + TP_ARGS(name, version, cmdbufs, relocs, waitchks), + + TP_STRUCT__entry( + __field(const char *, name) + __field(u32, version) + __field(u32, cmdbufs) + __field(u32, relocs) + __field(u32, waitchks) + ), + + TP_fast_assign( + __entry->name = name; + __entry->version = version; + __entry->cmdbufs = cmdbufs; + __entry->relocs = relocs; + __entry->waitchks = waitchks; + ), + + TP_printk("name=%s, version=%lu, cmdbufs=%lu, relocs=%ld, waitchks=%ld", + __entry->name, (unsigned long)__entry->version, + (unsigned long)__entry->cmdbufs, (unsigned long)__entry->relocs, + (unsigned long)__entry->waitchks) +); + +TRACE_EVENT(nvhost_channel_write_cmdbuf, + TP_PROTO(const char *name, u32 mem_id, u32 words, u32 offset), + + TP_ARGS(name, mem_id, words, offset), + + TP_STRUCT__entry( + __field(const char *, name) + __field(u32, mem_id) + __field(u32, words) + __field(u32, offset) + ), + + TP_fast_assign( + __entry->name = name; + __entry->mem_id = mem_id; + __entry->words = words; + __entry->offset = offset; + ), + + TP_printk("name=%s, mem_id=%08lx, words=%lu, offset=%ld", + __entry->name, (unsigned long)__entry->mem_id, + (unsigned long)__entry->words, (unsigned long)__entry->offset) +); + +TRACE_EVENT(nvhost_channel_write_relocs, + TP_PROTO(const char *name, u32 relocs), + + TP_ARGS(name, relocs), + + TP_STRUCT__entry( + __field(const char *, name) + __field(u32, relocs) + ), + + TP_fast_assign( + __entry->name = name; + __entry->relocs = relocs; + ), + + TP_printk("name=%s, relocs=%lu", + __entry->name, (unsigned long)__entry->relocs) +); + +TRACE_EVENT(nvhost_channel_write_waitchks, + TP_PROTO(const char *name, u32 waitchks, u32 waitmask), + + TP_ARGS(name, waitchks, waitmask), + + TP_STRUCT__entry( + __field(const char *, name) + __field(u32, waitchks) + __field(u32, waitmask) + ), + + TP_fast_assign( + __entry->name = name; + __entry->waitchks = waitchks; + __entry->waitmask = waitmask; + ), + + TP_printk("name=%s, waitchks=%lu, waitmask=%08lx", + __entry->name, (unsigned long)__entry->waitchks, + (unsigned long)__entry->waitmask) +); + +TRACE_EVENT(nvhost_channel_context_switch, + TP_PROTO(const char *name, void *old_ctx, void *new_ctx), + + TP_ARGS(name, old_ctx, new_ctx), + + TP_STRUCT__entry( + __field(const char *, name) + __field(void*, old_ctx) + __field(void*, new_ctx) + ), + + TP_fast_assign( + __entry->name = name; + __entry->old_ctx = old_ctx; + __entry->new_ctx = new_ctx; + ), + + TP_printk("name=%s, old=%08lx, new=%08lx", + __entry->name, (long unsigned int)__entry->old_ctx, + (long unsigned int)__entry->new_ctx) +); + +TRACE_EVENT(nvhost_ctrlopen, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name + ), + TP_printk("name=%s", __entry->name) +); + +TRACE_EVENT(nvhost_ctrlrelease, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name + ), + TP_printk("name=%s", __entry->name) +); + +TRACE_EVENT(nvhost_ioctl_ctrl_module_mutex, + TP_PROTO(u32 lock, u32 id), + + TP_ARGS(lock, id), + + TP_STRUCT__entry( + __field(u32, lock); + __field(u32, id); + ), + + TP_fast_assign( + __entry->lock = lock; + __entry->id = id; + ), + + TP_printk("lock=%u, id=%d", + __entry->lock, __entry->id) + ); + +TRACE_EVENT(nvhost_ioctl_ctrl_syncpt_incr, + TP_PROTO(u32 id), + + TP_ARGS(id), + + TP_STRUCT__entry( + __field(u32, id); + ), + + TP_fast_assign( + __entry->id = id; + ), + + TP_printk("id=%d", __entry->id) +); + +TRACE_EVENT(nvhost_ioctl_ctrl_syncpt_read, + TP_PROTO(u32 id), + + TP_ARGS(id), + + TP_STRUCT__entry( + __field(u32, id); + ), + + TP_fast_assign( + __entry->id = id; + ), + + TP_printk("id=%d", __entry->id) +); + +TRACE_EVENT(nvhost_ioctl_ctrl_syncpt_wait, + TP_PROTO(u32 id, u32 threshold, s32 timeout), + + TP_ARGS(id, threshold, timeout), + + TP_STRUCT__entry( + __field(u32, id) + __field(u32, threshold) + __field(s32, timeout) + ), + + TP_fast_assign( + __entry->id = id; + __entry->threshold = threshold; + __entry->timeout = timeout; + ), + + TP_printk("id=%u, threshold=%u, timeout=%d", + __entry->id, __entry->threshold, __entry->timeout) +); + +TRACE_EVENT(nvhost_channel_submitted, + TP_PROTO(const char *name, u32 syncpt_base, u32 syncpt_max), + + TP_ARGS(name, syncpt_base, syncpt_max), + + TP_STRUCT__entry( + __field(const char *, name) + __field(u32, syncpt_base) + __field(u32, syncpt_max) + ), + + TP_fast_assign( + __entry->name = name; + __entry->syncpt_base = syncpt_base; + __entry->syncpt_max = syncpt_max; + ), + + TP_printk("name=%s, syncpt_base=%d, syncpt_max=%d", + __entry->name, __entry->syncpt_base, __entry->syncpt_max) +); + +TRACE_EVENT(nvhost_channel_submit_complete, + TP_PROTO(const char *name, int count), + + TP_ARGS(name, count), + + TP_STRUCT__entry( + __field(const char *, name) + __field(int, count) + ), + + TP_fast_assign( + __entry->name = name; + __entry->count = count; + ), + + TP_printk("name=%s, count=%d", __entry->name, __entry->count) +); + +TRACE_EVENT(nvhost_wait_cdma, + TP_PROTO(const char *name, u32 eventid), + + TP_ARGS(name, eventid), + + TP_STRUCT__entry( + __field(const char *, name) + __field(u32, eventid) + ), + + TP_fast_assign( + __entry->name = name; + __entry->eventid = eventid; + ), + + TP_printk("name=%s, event=%d", __entry->name, __entry->eventid) +); + +#endif /* _TRACE_NVHOST_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> |