diff options
author | Vikas Jain <vjain@nvidia.com> | 2012-07-27 15:35:47 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-08-03 14:01:22 -0700 |
commit | 73c300b0f598a63d8557819614d62c0c7ea8d891 (patch) | |
tree | 047337f43e262f7c54da097d605fae41700a262a | |
parent | 5647ca7f3fe44781a3b9a49f3215d8c629d78f49 (diff) |
input: touch: atmel_mxt_ts: Add Ftrace logging.
This change assists automating system wide
touch driver performance.
Bug 928954
Change-Id: Iea21dfea1c31748ce5835652cecc0856c4f4028d
Signed-off-by: Vikas Jain <vjain@nvidia.com>
Reviewed-on: http://git-master/r/118984
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: David Jung <djung@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 10 | ||||
-rw-r--r-- | include/trace/events/nvevent.h | 100 |
2 files changed, 109 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index ad21ef9c0105..6721a1fd2456 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -3,7 +3,7 @@ * * Copyright (C) 2010 Samsung Electronics Co.Ltd * Copyright (C) 2011 Atmel Corporation - * Copyright (C) 2011 NVIDIA Corporation + * Copyright (C) 2011-2012 NVIDIA Corporation * Author: Joonyoung Shim <jy0922.shim@samsung.com> * * This program is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ #if defined(CONFIG_HAS_EARLYSUSPEND) #include <linux/earlysuspend.h> #endif +#define CREATE_TRACE_POINTS +#include <trace/events/nvevent.h> /* Family ID */ #define MXT224_ID 0x80 @@ -716,6 +718,7 @@ static void mxt_input_touchevent(struct mxt_data *data, finger[id].area = area; finger[id].pressure = pressure; + trace_nvevent_irq_data_submit("mxt_input_touchevent"); mxt_input_report(data, id); } @@ -728,11 +731,15 @@ static irqreturn_t mxt_interrupt(int irq, void *dev_id) int touchid; u8 reportid; + trace_nvevent_irq_data_read_start_series("mxt_input_interrupt"); do { + trace_nvevent_irq_data_read_start_single("mxt_input_interrupt"); if (mxt_read_message(data, &message)) { dev_err(dev, "Failed to read message\n"); goto end; } + trace_nvevent_irq_data_read_finish_single( + "mxt_input_interrupt"); reportid = message.reportid; @@ -751,6 +758,7 @@ static irqreturn_t mxt_interrupt(int irq, void *dev_id) } else if (reportid != MXT_RPTID_NOMSG) mxt_dump_message(dev, &message); } while (reportid != MXT_RPTID_NOMSG); + trace_nvevent_irq_data_read_finish_series("mxt_input_interrupt"); end: return IRQ_HANDLED; diff --git a/include/trace/events/nvevent.h b/include/trace/events/nvevent.h new file mode 100644 index 000000000000..30987129deaf --- /dev/null +++ b/include/trace/events/nvevent.h @@ -0,0 +1,100 @@ +/* + * include/trace/events/nvevent.h + * + * Input event logging to ftrace. + * + * Copyright (c) 2012, 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 nvevent + +#if !defined(_TRACE_NVEVENT_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_NVEVENT_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +TRACE_EVENT(nvevent_irq_data_read_start_series, + 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(nvevent_irq_data_read_finish_series, + 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(nvevent_irq_data_read_start_single, + 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(nvevent_irq_data_read_finish_single, + 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(nvevent_irq_data_submit, + 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) +); + +#endif /* _TRACE_NVEVENT_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> |