From 1775b972583588e562c1e6f614da60806c720168 Mon Sep 17 00:00:00 2001 From: brolley Date: Mon, 10 Mar 2008 18:45:03 +0000 Subject: 2008-03-10 Dave Brolley PR5189 * vsprintf.c (_stp_vsnprintf): Arguments for dynamic width and precision are of type 'int' again. * loc2c-runtime.h (deref_string): Copy the data only if dst is not NULL. (deref_buffer): New macro. --- runtime/ChangeLog | 8 ++++++++ runtime/loc2c-runtime.h | 22 ++++++++++++++++++++-- runtime/vsprintf.c | 4 ++-- 3 files changed, 30 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 497b9d5b..054def68 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,11 @@ +2008-03-10 Dave Brolley + + PR5189 + * vsprintf.c (_stp_vsnprintf): Arguments for dynamic width and precision + are of type 'int' again. + * loc2c-runtime.h (deref_string): Copy the data only if dst is not NULL. + (deref_buffer): New macro. + 2008-02-27 Martin Hunt * sym.h (_stp_module): Add text_size, lock, and unwind data diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h index 4674e399..7ea1b1e4 100644 --- a/runtime/loc2c-runtime.h +++ b/runtime/loc2c-runtime.h @@ -623,8 +623,26 @@ for (_len = (maxbytes), _addr = (uintptr_t)(addr); \ _len > 1 && (_c = deref (1, _addr)) != '\0'; \ --_len, ++_addr) \ - *_d++ = _c; \ - *_d = '\0'; \ + if (_d) \ + *_d++ = _c; \ + if (_d) \ + *_d = '\0'; \ + (dst); \ + }) + +#define deref_buffer(dst, addr, numbytes) \ + ({ \ + uintptr_t _addr; \ + size_t _len; \ + unsigned char _c; \ + char *_d = (dst); \ + for (_len = (numbytes), _addr = (uintptr_t)(addr); \ + _len >= 1; \ + --_len, ++_addr) { \ + _c = deref (1, _addr); \ + if (_d) \ + *_d++ = _c; \ + } \ (dst); \ }) diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index f8283e5c..0bf625a5 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -180,7 +180,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) else if (*fmt == '*') { ++fmt; /* it's the next argument */ - field_width = va_arg(args, int64_t); + field_width = va_arg(args, int); if (field_width < 0) { field_width = -field_width; flags |= STP_LEFT; @@ -196,7 +196,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) else if (*fmt == '*') { ++fmt; /* it's the next argument */ - precision = va_arg(args, int64_t); + precision = va_arg(args, int); } if (precision < 0) precision = 0; -- cgit From 42cb22bd8d3108863152cd2a26e787f508cfae6b Mon Sep 17 00:00:00 2001 From: hiramatu Date: Sat, 15 Mar 2008 00:02:00 +0000 Subject: 2008-03-14 Masami Hiramatsu PR 3542 * buildrun.cxx (compile_pass): Add an autoconf to check the kernel supports batch unregistration. * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Add an array of probe pointers for batch unregistration. * tapsets.cxx (dwarf_derived_probe_group::emit_module_exit): Use unregister_k(ret)probes if it is supported. * runtime/autoconf-unregister-kprobes.c : New file. --- runtime/ChangeLog | 5 +++++ runtime/autoconf-unregister-kprobes.c | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 runtime/autoconf-unregister-kprobes.c (limited to 'runtime') diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 054def68..92a6eb12 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2008-03-14 Masami Hiramatsu + + PR 3542 + * autoconf-unregister-kprobes.c : New file. + 2008-03-10 Dave Brolley PR5189 diff --git a/runtime/autoconf-unregister-kprobes.c b/runtime/autoconf-unregister-kprobes.c new file mode 100644 index 00000000..793891da --- /dev/null +++ b/runtime/autoconf-unregister-kprobes.c @@ -0,0 +1,4 @@ +#include + +void * x = (void *)unregister_kprobes; +void * y = (void *)unregister_kretprobes; -- cgit From 3e164074c421d45f63f43e1fde3be78a43428e4c Mon Sep 17 00:00:00 2001 From: eteo Date: Mon, 17 Mar 2008 14:46:49 +0000 Subject: 2008-03-17 Eugene Teo PR 5947 * autoconf-tsc-khz.c: Remove "&& defined(__i386__)" to make the test more pessimistic. --- runtime/ChangeLog | 6 ++++++ runtime/autoconf-tsc-khz.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 92a6eb12..b52ddf7b 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,9 @@ +2008-03-17 Eugene Teo + + PR 5947 + * autoconf-tsc-khz.c: Remove "&& defined(__i386__)" to make the test + more pessimistic. + 2008-03-14 Masami Hiramatsu PR 3542 diff --git a/runtime/autoconf-tsc-khz.c b/runtime/autoconf-tsc-khz.c index 6c3f453e..f60bf6d0 100644 --- a/runtime/autoconf-tsc-khz.c +++ b/runtime/autoconf-tsc-khz.c @@ -1,7 +1,7 @@ #include #include -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) && defined(__i386__) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) #error "tsc_khz is not exported" #endif unsigned int *ptsc = &tsc_khz; -- cgit