Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: net/disk_cache/stress_cache.cc

Issue 8467028: Enable DVLOG on non official release build based on the parameter passed for InitLogging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | net/tools/flip_server/flip_in_mem_edsm_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is a simple application that stress-tests the crash recovery of the disk 5 // This is a simple application that stress-tests the crash recovery of the disk
6 // cache. The main application starts a copy of itself on a loop, checking the 6 // cache. The main application starts a copy of itself on a loop, checking the
7 // exit code of the child process. When the child dies in an unexpected way, 7 // exit code of the child process. When the child dies in an unexpected way,
8 // the main application quits. 8 // the main application quits.
9 9
10 // The child application has two threads: one to exercise the cache in an 10 // The child application has two threads: one to exercise the cache in an
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 logging::SetLogAssertHandler(CrashHandler); 261 logging::SetLogAssertHandler(CrashHandler);
262 logging::SetLogMessageHandler(MessageHandler); 262 logging::SetLogMessageHandler(MessageHandler);
263 263
264 #if defined(OS_WIN) 264 #if defined(OS_WIN)
265 logging::LogEventProvider::Initialize(kStressCacheTraceProviderName); 265 logging::LogEventProvider::Initialize(kStressCacheTraceProviderName);
266 #else 266 #else
267 CommandLine::Init(argc, argv); 267 CommandLine::Init(argc, argv);
268 logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 268 logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
269 logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE, 269 logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE,
270 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 270 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS,
271 logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS);
271 #endif 272 #endif
272 273
273 // Some time for the memory manager to flush stuff. 274 // Some time for the memory manager to flush stuff.
274 base::PlatformThread::Sleep(3000); 275 base::PlatformThread::Sleep(3000);
275 MessageLoop message_loop(MessageLoop::TYPE_IO); 276 MessageLoop message_loop(MessageLoop::TYPE_IO);
276 277
277 char* end; 278 char* end;
278 long int iteration = strtol(argv[1], &end, 0); 279 long int iteration = strtol(argv[1], &end, 0);
279 280
280 if (!StartCrashThread()) { 281 if (!StartCrashThread()) {
281 printf("failed to start thread\n"); 282 printf("failed to start thread\n");
282 return kError; 283 return kError;
283 } 284 }
284 285
285 StressTheCache(iteration); 286 StressTheCache(iteration);
286 return 0; 287 return 0;
287 } 288 }
OLDNEW
« no previous file with comments | « media/tools/player_x11/player_x11.cc ('k') | net/tools/flip_server/flip_in_mem_edsm_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698