summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreroman <eroman@chromium.org>2015-03-31 17:24:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-01 00:25:21 +0000
commit07fd7b1e2615286d792a769585da93abf2be8015 (patch)
tree21e0e2f354f963486e77ba99f288ad84130f81f8
parent3d69b19b57904847ffec31b0f5d4f3568b5c6f35 (diff)
downloadchromium_src-07fd7b1e2615286d792a769585da93abf2be8015.zip
chromium_src-07fd7b1e2615286d792a769585da93abf2be8015.tar.gz
chromium_src-07fd7b1e2615286d792a769585da93abf2be8015.tar.bz2
Partially remove the instrumentation for testing invalid BoundNetLog.
I left in the "crash on invalid" behavior, however removed the StackTrace. Haven't solved this issue yet, however we probably don't want the StackTrace going into M43 as it increases memory usage (issue 469701). BUG=467797,469701 Review URL: https://codereview.chromium.org/1051553003 Cr-Commit-Position: refs/heads/master@{#323153}
-rw-r--r--net/base/net_log.cc18
-rw-r--r--net/base/net_log.h21
2 files changed, 3 insertions, 36 deletions
diff --git a/net/base/net_log.cc b/net/base/net_log.cc
index 70e3ed3..0c5843c 100644
--- a/net/base/net_log.cc
+++ b/net/base/net_log.cc
@@ -5,9 +5,7 @@
#include "net/base/net_log.h"
#include "base/bind.h"
-#ifdef TEMP_INSTRUMENTATION_467797
#include "base/debug/alias.h"
-#endif
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -402,15 +400,7 @@ void NetLog::AddEntry(EventType type,
}
BoundNetLog::~BoundNetLog() {
-#ifdef TEMP_INSTRUMENTATION_467797
liveness_ = DEAD;
- stack_trace_ = base::debug::StackTrace();
-
- // Probably not necessary, but just in case compiler tries to optimize out the
- // writes to liveness_ and stack_trace_.
- base::debug::Alias(&liveness_);
- base::debug::Alias(&stack_trace_);
-#endif
}
void BoundNetLog::AddEntry(NetLog::EventType type,
@@ -516,21 +506,13 @@ BoundNetLog BoundNetLog::Make(NetLog* net_log,
}
void BoundNetLog::CrashIfInvalid() const {
-#ifdef TEMP_INSTRUMENTATION_467797
Liveness liveness = liveness_;
if (liveness == ALIVE)
return;
- // Copy relevant variables onto the stack to guarantee they will be available
- // in minidumps, and then crash.
- base::debug::StackTrace stack_trace = stack_trace_;
-
base::debug::Alias(&liveness);
- base::debug::Alias(&stack_trace);
-
CHECK_EQ(ALIVE, liveness);
-#endif
}
} // namespace net
diff --git a/net/base/net_log.h b/net/base/net_log.h
index b78f868..de22458 100644
--- a/net/base/net_log.h
+++ b/net/base/net_log.h
@@ -9,20 +9,10 @@
#include "build/build_config.h"
-// TODO(eroman): Temporary while investigating crbug.com/467797.
-// Note base::Debug::StackTrace() is not supported in NACL builds
-// so conditionally disabled it there.
-#ifndef OS_NACL
-#define TEMP_INSTRUMENTATION_467797
-#endif
-
#include "base/atomicops.h"
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
-#ifdef TEMP_INSTRUMENTATION_467797
-#include "base/debug/stack_trace.h"
-#endif
#include "base/observer_list.h"
#include "base/strings/string16.h"
#include "base/synchronization/lock.h"
@@ -401,29 +391,24 @@ class NET_EXPORT BoundNetLog {
NetLog* net_log() const { return net_log_; }
private:
-#ifdef TEMP_INSTRUMENTATION_467797
- // TODO(eroman): Temporary while investigating crbug.com/467797
+ // TODO(eroman): Temporary until crbug.com/467797 is solved.
enum Liveness {
ALIVE = 0xCA11AB13,
DEAD = 0xDEADBEEF,
};
-#endif
BoundNetLog(const NetLog::Source& source, NetLog* net_log)
: source_(source), net_log_(net_log) {
}
- // TODO(eroman): Temporary while investigating crbug.com/467797
+ // TODO(eroman): Temporary until crbug.com/467797 is solved.
void CrashIfInvalid() const;
NetLog::Source source_;
NetLog* net_log_;
-#ifdef TEMP_INSTRUMENTATION_467797
- // TODO(eroman): Temporary while investigating crbug.com/467797
+ // TODO(eroman): Temporary until crbug.com/467797 is solved.
Liveness liveness_ = ALIVE;
- base::debug::StackTrace stack_trace_;
-#endif
};
} // namespace net