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

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 2604433002: Adjust memory sizes of persistent histogram allocations. (Closed)
Patch Set: Created 3 years, 12 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/browser_child_process_host_impl.h" 5 #include "content/browser/browser_child_process_host_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/dump_without_crashing.h" 10 #include "base/debug/dump_without_crashing.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // they're active in the browser. 465 // they're active in the browser.
466 // TODO(bcwhite): Remove this once persistence is always enabled. 466 // TODO(bcwhite): Remove this once persistence is always enabled.
467 if (!base::GlobalHistogramAllocator::Get()) 467 if (!base::GlobalHistogramAllocator::Get())
468 return; 468 return;
469 469
470 // Determine the correct parameters based on the process type. 470 // Determine the correct parameters based on the process type.
471 size_t memory_size; 471 size_t memory_size;
472 base::StringPiece metrics_name; 472 base::StringPiece metrics_name;
473 switch (data_.process_type) { 473 switch (data_.process_type) {
474 case PROCESS_TYPE_UTILITY: 474 case PROCESS_TYPE_UTILITY:
475 memory_size = 100 << 10; // 100 KiB 475 memory_size = 64 << 10; // 64 KiB
476 metrics_name = "UtilityMetrics"; 476 metrics_name = "UtilityMetrics";
477 break; 477 break;
478 478
479 case PROCESS_TYPE_ZYGOTE: 479 case PROCESS_TYPE_ZYGOTE:
480 memory_size = 100 << 10; // 100 KiB 480 memory_size = 64 << 10; // 64 KiB
481 metrics_name = "ZygoteMetrics"; 481 metrics_name = "ZygoteMetrics";
482 break; 482 break;
483 483
484 case PROCESS_TYPE_SANDBOX_HELPER: 484 case PROCESS_TYPE_SANDBOX_HELPER:
485 memory_size = 100 << 10; // 100 KiB 485 memory_size = 64 << 10; // 64 KiB
486 metrics_name = "SandboxHelperMetrics"; 486 metrics_name = "SandboxHelperMetrics";
487 break; 487 break;
488 488
489 case PROCESS_TYPE_GPU: 489 case PROCESS_TYPE_GPU:
490 memory_size = 100 << 10; // 100 KiB 490 memory_size = 64 << 10; // 64 KiB
491 metrics_name = "GpuMetrics"; 491 metrics_name = "GpuMetrics";
492 break; 492 break;
493 493
494 case PROCESS_TYPE_PPAPI_PLUGIN: 494 case PROCESS_TYPE_PPAPI_PLUGIN:
495 memory_size = 100 << 10; // 100 KiB 495 memory_size = 64 << 10; // 64 KiB
496 metrics_name = "PpapiPluginMetrics"; 496 metrics_name = "PpapiPluginMetrics";
497 break; 497 break;
498 498
499 case PROCESS_TYPE_PPAPI_BROKER: 499 case PROCESS_TYPE_PPAPI_BROKER:
500 memory_size = 100 << 10; // 100 KiB 500 memory_size = 64 << 10; // 64 KiB
501 metrics_name = "PpapiBrokerMetrics"; 501 metrics_name = "PpapiBrokerMetrics";
502 break; 502 break;
503 503
504 default: 504 default:
505 UMA_HISTOGRAM_ENUMERATION( 505 UMA_HISTOGRAM_ENUMERATION(
506 "UMA.SubprocessMetricsProvider.UntrackedProcesses", 506 "UMA.SubprocessMetricsProvider.UntrackedProcesses",
507 data_.process_type, PROCESS_TYPE_CONTENT_END); 507 data_.process_type, PROCESS_TYPE_CONTENT_END);
508 return; 508 return;
509 } 509 }
510 510
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 598
599 #if defined(OS_WIN) 599 #if defined(OS_WIN)
600 600
601 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 601 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
602 OnChildDisconnected(); 602 OnChildDisconnected();
603 } 603 }
604 604
605 #endif 605 #endif
606 606
607 } // namespace content 607 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698