From 482472c332a2a8a9df203bb6fb8f3f6ed87a9cf4 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 5 Feb 2009 13:45:26 -0500 Subject: PR9740/9816? - workaround for kernel valloc bug --- ChangeLog | 5 +++++ buildrun.cxx | 1 + runtime/ChangeLog | 5 +++++ runtime/autoconf-vm-area.c | 9 +++++++++ runtime/transport/ChangeLog | 7 +++++++ runtime/transport/transport.c | 9 +++++++++ 6 files changed, 36 insertions(+) create mode 100644 runtime/autoconf-vm-area.c diff --git a/ChangeLog b/ChangeLog index 8258c422..77d0bcac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-05 Frank Ch. Eigler + + PR9740/9816? + * buildrun.cxx: Add STAPCONF_VM_AREA autoconf test. + 2009-02-04 Mark Wielaard * NEWS: process().mark(), sys/sdt.h and dtrace compatibility script. diff --git a/buildrun.cxx b/buildrun.cxx index 6ce56a09..15ba3ae1 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -121,6 +121,7 @@ compile_pass (systemtap_session& s) o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-task-uid.c, -DSTAPCONF_TASK_UID,)" << endl; + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-vm-area.c, -DSTAPCONF_VM_AREA,)" << endl; #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 1c8f33b4..81a78c4b 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2009-02-05 Frank Ch. Eigler + + PR 9740/9816? + * autoconf-vm-area.c: New test. + 2009-02-02 Mark Wielaard * sdt.h: Add STAP_PROBE7, 8 and 9 variants. diff --git a/runtime/autoconf-vm-area.c b/runtime/autoconf-vm-area.c new file mode 100644 index 00000000..920d103d --- /dev/null +++ b/runtime/autoconf-vm-area.c @@ -0,0 +1,9 @@ +#include +#include + +void foo (void) +{ + void *dummy; + dummy = alloc_vm_area (PAGE_SIZE); + free_vm_area (dummy); +} diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index e8e2a047..02f9f119 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,10 @@ +2009-02-05 Frank Ch. Eigler + + PR9740/9816? + * transport.c (_stp_handle_start): Run alloc/free_vm_area() dummy + calls as workaround for kernel valloc/vfree bug. Suggested by + Masami Hiramat . + 2009-01-06 Frank Ch. Eigler PR9699. diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index a572ef9c..97fbf860 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -64,6 +64,15 @@ static struct workqueue_struct *_stp_wq; static void _stp_handle_start(struct _stp_msg_start *st) { dbug_trans(1, "stp_handle_start\n"); + +#ifdef STAPCONF_VM_AREA + { /* PR9740: workaround for kernel valloc bug. */ + void *dummy; + dummy = alloc_vm_area (PAGE_SIZE); + free_vm_area (dummy); + } +#endif + _stp_target = st->target; st->res = probe_start(); if (st->res >= 0) -- cgit