Revision: 917 Author: teawater Date: Mon Feb 13 16:28:10 2012 Log: Update gtp_for_review.patch http://code.google.com/p/kgtp/source/detail?r=917 Modified: /trunk/gtp_for_review.patch ======================================= --- /trunk/gtp_for_review.patch Tue Jan 31 04:51:57 2012 +++ /trunk/gtp_for_review.patch Mon Feb 13 16:28:10 2012 @@ -11,10 +11,10 @@ lib/Kconfig.debug | 10 lib/Makefile | 4lib/gtp.c | 8433 +++++++++++++++++++++++++++++++++
- lib/gtp_rb.c | 474 + + lib/gtp_rb.c | 495 + scripts/getgtprsp.pl | 102 scripts/getmod.py | 132 - 13 files changed, 10986 insertions(+), 2 deletions(-) + 13 files changed, 11007 insertions(+), 2 deletions(-) --- /dev/null +++ b/Documentation/trace/gtp.txt @@ -1849,7 +1849,7 @@ +#endif --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h -@@ -1145,9 +1145,12 @@ extern void perf_output_copy(struct perf +@@ -1146,9 +1146,12 @@ extern void perf_output_copy(struct perf const void *buf, unsigned int len); extern int perf_swevent_get_recursion_context(void); extern void perf_swevent_put_recursion_context(int rctx); @@ -1898,7 +1898,7 @@ /* * Enable a event. -@@ -3035,6 +3037,14 @@ static void perf_event_reset(struct perf +@@ -3065,6 +3067,14 @@ static void perf_event_reset(struct perf perf_event_update_userpage(event); } @@ -1934,16 +1934,16 @@ source "lib/Kconfig.kgdb" --- a/lib/Makefile +++ b/lib/Makefile -@@ -121,6 +121,8 @@ obj-$(CONFIG_DQL) += dynamic_queue_limit - obj-$(CONFIG_MPILIB) += mpi/ - obj-$(CONFIG_SIGNATURE) += digsig.o +@@ -123,6 +123,8 @@ obj-$(CONFIG_SIGNATURE) += digsig.o + + obj-$(CONFIG_CLZ_TAB) += clz_tab.o +obj-$(CONFIG_GTP) += gtp.o + hostprogs-y := gen_crc32table clean-files := crc32table.h -@@ -131,3 +133,5 @@ quiet_cmd_crc32 = GEN $@ +@@ -133,3 +135,5 @@ quiet_cmd_crc32 = GEN $@ $(obj)/crc32table.h: $(obj)/gen_crc32table $(call cmd,crc32) @@ -10387,7 +10387,28 @@ +MODULE_LICENSE("GPL"); --- /dev/null +++ b/lib/gtp_rb.c -@@ -0,0 +1,474 @@ +@@ -0,0 +1,495 @@ ++/* ++ * Ring buffer of kernel GDB tracepoint module. ++ * ++ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ * ++ * Copyright(C) KGTP team (https://code.google.com/p/kgtp/), 2011, 2012 ++ * ++ */ ++ +#define ADDR_SIZE sizeof(size_t) +#define GTP_RB_HEAD(addr) ((void *)((size_t)(addr) & PAGE_MASK)) +#define GTP_RB_DATA(addr) (GTP_RB_HEAD(addr) + ADDR_SIZE) @@ -10580,7 +10601,7 @@ + if (id) { + /* Need insert a FID_PAGE_BEGIN. */ + FID(rb->w) = FID_PAGE_BEGIN; -+ *((u64 *)rb->w + FID_SIZE) = id; ++ *((u64 *)(rb->w + FID_SIZE)) = id; + rb->w += FRAME_ALIGN(GTP_FRAME_PAGE_BEGIN_SIZE); + } + }