Permalink
Browse files

bump to gperftools 2.0

  • Loading branch information...
1 parent f4139fc commit 2d0e799d2bd8eb6aa61167169bea1f6b08af615e @tmm1 committed Mar 8, 2012
View
@@ -3,7 +3,7 @@
def sys(cmd)
puts " -- #{cmd}"
unless ret = xsystem(cmd)
- raise "#{cmd} failed, please report to perftools@tmm1.net with pastie.org link to #{CWD}/mkmf.log and #{CWD}/src/google-perftools-1.6/config.log"
+ raise "#{cmd} failed, please report to https://github.com/tmm1/perfools.rb/issues/new with #{CWD}/mkmf.log and #{CWD}/src/gperftools-2.0/config.log"
@bearded
bearded Mar 9, 2012

{CWD}/mkmf.log ~> #{CWD}/src/mkmf.log

$ ls perftools.rb-0.5.6/ext/src/
google-perftools-1.6        google-perftools-1.6.tar.gz mkmf.log

$ ls perftools.rb-2.0.0/ext/src/
gperftools-2.0      gperftools-2.0.tar.gz   mkmf.log
end
ret
end
@@ -27,7 +27,7 @@ def sys(cmd)
end
end
-perftools = File.basename('google-perftools-1.6.tar.gz')
+perftools = File.basename('gperftools-2.0.tar.gz')
dir = File.basename(perftools, '.tar.gz')
puts "(I'm about to compile google-perftools.. this will definitely take a while)"
@@ -48,7 +48,7 @@ def sys(cmd)
['perftools-notests', true],
['perftools-pprof', true],
['perftools-gc', true],
- ['perftools-osx', RUBY_PLATFORM =~ /darwin/],
+ ['perftools-osx', false], # fixed in 2.0
['perftools-debug', true],
['perftools-objects', true],
['perftools-frames', true]
Binary file not shown.
Binary file not shown.
@@ -1,15 +1,33 @@
diff --git a/Makefile.in b/Makefile.in
-index b301f4d..969db5e 100644
+index be6bce7..423baba 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -65,9 +65,7 @@ host_triplet = @host@
- @ENABLE_FRAME_POINTERS_TRUE@@X86_64_AND_NO_FP_BY_DEFAULT_TRUE@am__append_3 = -fno-omit-frame-pointer
- @ENABLE_FRAME_POINTERS_FALSE@@X86_64_AND_NO_FP_BY_DEFAULT_TRUE@am__append_4 = -DNO_FRAME_POINTER
- @MINGW_TRUE@am__append_5 = -Wl,-u__tcmalloc
+@@ -66,26 +66,8 @@ host_triplet = @host@
+ @ENABLE_FRAME_POINTERS_TRUE@@X86_64_AND_NO_FP_BY_DEFAULT_TRUE@am__append_5 = -fno-omit-frame-pointer
+ @ENABLE_FRAME_POINTERS_FALSE@@X86_64_AND_NO_FP_BY_DEFAULT_TRUE@am__append_6 = -DNO_FRAME_POINTER
+ @MINGW_TRUE@am__append_7 = -Wl,-u__tcmalloc
+-TESTS = low_level_alloc_unittest$(EXEEXT) atomicops_unittest$(EXEEXT) \
+- $(am__EXEEXT_9) tcmalloc_minimal_unittest$(EXEEXT) \
+- tcmalloc_minimal_large_unittest$(EXEEXT) $(am__append_17) \
+- addressmap_unittest$(EXEEXT) $(am__EXEEXT_10) \
+- packed_cache_test$(EXEEXT) frag_unittest$(EXEEXT) \
+- markidle_unittest$(EXEEXT) \
+- current_allocated_bytes_test$(EXEEXT) \
+- malloc_hook_test$(EXEEXT) malloc_extension_test$(EXEEXT) \
+- $(am__EXEEXT_11) $(am__EXEEXT_12) page_heap_test$(EXEEXT) \
+- pagemap_unittest$(EXEEXT) realloc_unittest$(EXEEXT) \
+- stack_trace_table_test$(EXEEXT) \
+- thread_dealloc_unittest$(EXEEXT) $(am__EXEEXT_13) \
+- $(am__EXEEXT_14) $(am__EXEEXT_15) $(am__append_29) \
+- $(am__EXEEXT_16) $(am__EXEEXT_17) $(am__EXEEXT_18) \
+- $(am__EXEEXT_19) $(am__append_49) $(am__EXEEXT_20) \
+- $(am__append_58) $(am__append_60) $(am__EXEEXT_21) \
+- $(am__EXEEXT_22)
-noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
- $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
- $(am__EXEEXT_7) $(am__EXEEXT_8) $(am__EXEEXT_23)
++TESTS =
+noinst_PROGRAMS =
bin_PROGRAMS =
- @MINGW_TRUE@am__append_6 = libwindows.la libspinlock.la
+ @MINGW_TRUE@am__append_8 = libwindows.la libspinlock.la
@@ -1,53 +1,60 @@
+commit 7a33a39f5b31e41f87a47bcadff818208fcc6c05
+Author: Aman Gupta <aman@tmm1.net>
+Date: Wed Mar 7 22:55:33 2012 -0800
+
+ perftools-objects
+
diff --git a/src/profile-handler.cc b/src/profile-handler.cc
-index 5df5054..2335617 100644
+index f9d8d8b..91f6f72 100644
--- a/src/profile-handler.cc
+++ b/src/profile-handler.cc
-@@ -395,6 +395,8 @@ void ProfileHandler::GetState(ProfileHandlerState* state) {
- }
-
- void ProfileHandler::StartTimer() {
+@@ -426,6 +426,8 @@ void ProfileHandler::StartTimer() {
+ if (!allowed_) {
+ return;
+ }
+ if (getenv("CPUPROFILE_OBJECTS") || getenv("CPUPROFILE_METHODS")) return;
+
struct itimerval timer;
timer.it_interval.tv_sec = 0;
timer.it_interval.tv_usec = 1000000 / frequency_;
-@@ -403,12 +405,16 @@ void ProfileHandler::StartTimer() {
- }
-
- void ProfileHandler::StopTimer() {
+@@ -437,6 +439,8 @@ void ProfileHandler::StopTimer() {
+ if (!allowed_) {
+ return;
+ }
+ if (getenv("CPUPROFILE_OBJECTS") || getenv("CPUPROFILE_METHODS")) return;
+
struct itimerval timer;
memset(&timer, 0, sizeof timer);
setitimer(timer_type_, &timer, 0);
- }
-
- bool ProfileHandler::IsTimerRunning() {
+@@ -446,6 +450,8 @@ bool ProfileHandler::IsTimerRunning() {
+ if (!allowed_) {
+ return false;
+ }
+ if (getenv("CPUPROFILE_OBJECTS") || getenv("CPUPROFILE_METHODS")) return false;
+
struct itimerval current_timer;
RAW_CHECK(0 == getitimer(timer_type_, &current_timer), "getitimer");
return (current_timer.it_value.tv_sec != 0 ||
-@@ -416,6 +422,8 @@ bool ProfileHandler::IsTimerRunning() {
- }
-
- void ProfileHandler::EnableHandler() {
+@@ -456,6 +462,8 @@ void ProfileHandler::EnableHandler() {
+ if (!allowed_) {
+ return;
+ }
+ if (getenv("CPUPROFILE_OBJECTS") || getenv("CPUPROFILE_METHODS")) return;
+
struct sigaction sa;
sa.sa_sigaction = SignalHandler;
sa.sa_flags = SA_RESTART | SA_SIGINFO;
-@@ -425,6 +433,8 @@ void ProfileHandler::EnableHandler() {
- }
-
- void ProfileHandler::DisableHandler() {
+@@ -468,6 +476,8 @@ void ProfileHandler::DisableHandler() {
+ if (!allowed_) {
+ return;
+ }
+ if (getenv("CPUPROFILE_OBJECTS") || getenv("CPUPROFILE_METHODS")) return;
+
struct sigaction sa;
sa.sa_handler = SIG_IGN;
sa.sa_flags = SA_RESTART;
diff --git a/src/profiler.cc b/src/profiler.cc
-index f408cf8..7645c45 100644
+index 6538299..8e92b91 100644
--- a/src/profiler.cc
+++ b/src/profiler.cc
@@ -102,6 +102,10 @@ class CpuProfiler {

0 comments on commit 2d0e799

Please sign in to comment.