Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make valgrind usage more consistent and less error prone. #1262

Merged
merged 1 commit into from
Dec 6, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mk/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ CFG_GCCISH_LINK_FLAGS :=
# embedded into the executable, so use a no-op command.
CFG_DSYMUTIL := true

ifneq ($(CFG_VALGRIND),)
CFG_GCCISH_CFLAGS += -DHAVE_VALGRIND
ifeq ($(CFG_VALGRIND),)
CFG_GCCISH_CFLAGS += -DNVALGRIND
endif

ifneq ($(findstring freebsd,$(CFG_OSTYPE)),)
Expand Down
2 changes: 1 addition & 1 deletion mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ else
endif

RUNTIME_DEF_$(1) := rt/rustrt$$(CFG_DEF_SUFFIX)
RUNTIME_INCS_$(1) := -I $$(S)src/rt/isaac -I $$(S)src/rt/uthash \
RUNTIME_INCS_$(1) := -I $$(S)src/rt -I $$(S)src/rt/isaac -I $$(S)src/rt/uthash \
-I $$(S)src/rt/arch/$$(HOST_$(1)) \
-I $$(S)src/libuv/include
RUNTIME_OBJS_$(1) := $$(RUNTIME_CS_$(1):rt/%.cpp=rt/$(1)/%.o) \
Expand Down
4 changes: 1 addition & 3 deletions src/rt/arch/i386/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <inttypes.h>
#include <stdint.h>

#include "../../memcheck.h"
#include "vg/memcheck.h"

template<typename T>
T align_down(T sp)
Expand Down Expand Up @@ -51,9 +51,7 @@ class context {
uint32_t bot = regs.esp;
uint32_t top = align_down(bot - nbytes);

#ifdef HAVE_VALGRIND
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
#endif

return reinterpret_cast<void *>(top);
}
Expand Down
6 changes: 1 addition & 5 deletions src/rt/arch/x86_64/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#include <stdint.h>
#include <xmmintrin.h>

#ifdef HAVE_VALGRIND
#include <valgrind/memcheck.h>
#endif
#include "vg/memcheck.h"

template<typename T>
T align_down(T sp)
Expand Down Expand Up @@ -51,9 +49,7 @@ class context {
uint64_t bot = regs.data[RUSTRT_RSP];
uint64_t top = align_down(bot - nbytes);

#ifdef HAVE_VALGRIND
(void)VALGRIND_MAKE_MEM_UNDEFINED(top - 4, bot - top + 4);
#endif

return reinterpret_cast<void *>(top);
}
Expand Down
4 changes: 2 additions & 2 deletions src/rt/rust_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "rust_internal.h"
#include "rust_cc.h"

#include "valgrind.h"
#include "memcheck.h"
#include "vg/valgrind.h"
#include "vg/memcheck.h"

#ifndef __WIN32__
#include <execinfo.h>
Expand Down
2 changes: 1 addition & 1 deletion src/rt/rust_timer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "rust_internal.h"
#include "valgrind.h"
#include "vg/valgrind.h"

// The mechanism in this file is very crude; every domain (thread) spawns its
// own secondary timer thread, and that timer thread *never idles*. It
Expand Down
File renamed without changes.
File renamed without changes.