summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-11-15 14:35:40 -0500
committerFrank Ch. Eigler <fche@elastic.org>2007-11-15 14:35:40 -0500
commit055e8b89db8f76f0ccc05d08acfe979ba50024d6 (patch)
tree5c51849d470c1ff74162fbeb6be56f190d524daf /runtime
parent3cf29fed2ae7b36527c95c93754a4c0b0e51e749 (diff)
parentf781f849ceedba83580eead82c3baf949a9738db (diff)
downloadsystemtap-steved-055e8b89db8f76f0ccc05d08acfe979ba50024d6.tar.gz
systemtap-steved-055e8b89db8f76f0ccc05d08acfe979ba50024d6.tar.xz
systemtap-steved-055e8b89db8f76f0ccc05d08acfe979ba50024d6.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ChangeLog11
-rw-r--r--runtime/print.c24
-rw-r--r--runtime/regs-ia64.c3
-rw-r--r--runtime/uprobes/Makefile6
4 files changed, 37 insertions, 7 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index e6079bea..8fa11695 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,14 @@
+2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com>
+
+ From Cai Fei <caifei@cn.fujitsu.com>
+ * regs-ia64.c (ia64_fetch_register): Fix the bug of fetching
+ register 12 on IA64.
+
+2007-11-12 Martin Hunt <hunt@redhat.com>
+
+ * print.c (_stp_print): Rewrite to eliminate the strlen()
+ call and save a bit of time.
+
2007-11-09 Masami Hiramatsu <mhiramat@redhat.com>
PR3858
diff --git a/runtime/print.c b/runtime/print.c
index 326d67d5..a451f622 100644
--- a/runtime/print.c
+++ b/runtime/print.c
@@ -210,16 +210,26 @@ void _stp_printf (const char *fmt, ...)
void _stp_print (const char *str)
{
- int num = strlen (str);
_stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id());
- int size = STP_BUFFER_SIZE - pb->len;
- if (unlikely(num >= size)) {
+ char *end = pb->buf + STP_BUFFER_SIZE;
+ char *ptr = pb->buf + pb->len;
+ char *instr = (char *)str;
+
+ while (ptr < end && *instr)
+ *ptr++ = *instr++;
+
+ /* Did loop terminate due to lack of buffer space? */
+ if (unlikely(*instr)) {
+ /* Don't break strings across subbufs. */
+ /* Restart after flushing. */
_stp_print_flush();
- if (num > STP_BUFFER_SIZE)
- num = STP_BUFFER_SIZE;
+ end = pb->buf + STP_BUFFER_SIZE;
+ ptr = pb->buf + pb->len;
+ instr = (char *)str;
+ while (ptr < end && *instr)
+ *ptr++ = *instr++;
}
- memcpy (pb->buf + pb->len, str, num);
- pb->len += num;
+ pb->len = ptr - pb->buf;
}
void _stp_print_char (const char c)
diff --git a/runtime/regs-ia64.c b/runtime/regs-ia64.c
index 50bf17d7..2a5a1d17 100644
--- a/runtime/regs-ia64.c
+++ b/runtime/regs-ia64.c
@@ -39,6 +39,9 @@ static long ia64_fetch_register(int regno, struct pt_regs *pt_regs)
{
struct ia64_stap_get_arbsp_param pa;
+ if (regno == 12)
+ return pt_regs->r12;
+
if (regno >= 8 && regno <= 11)
return *(unsigned long *)(&pt_regs->r8 + regno - 8);
else if (regno < 32 || regno > 127)
diff --git a/runtime/uprobes/Makefile b/runtime/uprobes/Makefile
index 806f7c48..40af7aa2 100644
--- a/runtime/uprobes/Makefile
+++ b/runtime/uprobes/Makefile
@@ -1,10 +1,16 @@
obj-m := uprobes.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
+DEPENDENCIES := $(shell echo uprobes_arch.[ch] uprobes.[ch] uprobes_*.[ch])
+DEPENDENCIES += Makefile $(KDIR)/Module.symvers
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+# This target is used with "make -q" to see whether a "real" build is needed.
+uprobes.ko: $(DEPENDENCIES)
+ @echo uprobes.ko is not a valid target. See Makefile.
+
clean:
rm -f *.mod.c *.ko *.o .*.cmd *~
rm -rf .tmp_versions