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

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

Issue 2619203006: Adjust memory sizes of persistent histogram allocations. (Closed)
Patch Set: Created 3 years, 11 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // they're active in the browser. 473 // they're active in the browser.
474 // TODO(bcwhite): Remove this once persistence is always enabled. 474 // TODO(bcwhite): Remove this once persistence is always enabled.
475 if (!base::GlobalHistogramAllocator::Get()) 475 if (!base::GlobalHistogramAllocator::Get())
476 return; 476 return;
477 477
478 // Determine the correct parameters based on the process type. 478 // Determine the correct parameters based on the process type.
479 size_t memory_size; 479 size_t memory_size;
480 base::StringPiece metrics_name; 480 base::StringPiece metrics_name;
481 switch (data_.process_type) { 481 switch (data_.process_type) {
482 case PROCESS_TYPE_UTILITY: 482 case PROCESS_TYPE_UTILITY:
483 memory_size = 100 << 10; // 100 KiB 483 memory_size = 64 << 10; // 64 KiB
484 metrics_name = "UtilityMetrics"; 484 metrics_name = "UtilityMetrics";
485 break; 485 break;
486 486
487 case PROCESS_TYPE_ZYGOTE: 487 case PROCESS_TYPE_ZYGOTE:
488 memory_size = 100 << 10; // 100 KiB 488 memory_size = 64 << 10; // 64 KiB
489 metrics_name = "ZygoteMetrics"; 489 metrics_name = "ZygoteMetrics";
490 break; 490 break;
491 491
492 case PROCESS_TYPE_SANDBOX_HELPER: 492 case PROCESS_TYPE_SANDBOX_HELPER:
493 memory_size = 100 << 10; // 100 KiB 493 memory_size = 64 << 10; // 64 KiB
494 metrics_name = "SandboxHelperMetrics"; 494 metrics_name = "SandboxHelperMetrics";
495 break; 495 break;
496 496
497 case PROCESS_TYPE_GPU: 497 case PROCESS_TYPE_GPU:
498 memory_size = 100 << 10; // 100 KiB 498 memory_size = 64 << 10; // 64 KiB
499 metrics_name = "GpuMetrics"; 499 metrics_name = "GpuMetrics";
500 break; 500 break;
501 501
502 case PROCESS_TYPE_PPAPI_PLUGIN: 502 case PROCESS_TYPE_PPAPI_PLUGIN:
503 memory_size = 100 << 10; // 100 KiB 503 memory_size = 64 << 10; // 64 KiB
504 metrics_name = "PpapiPluginMetrics"; 504 metrics_name = "PpapiPluginMetrics";
505 break; 505 break;
506 506
507 case PROCESS_TYPE_PPAPI_BROKER: 507 case PROCESS_TYPE_PPAPI_BROKER:
508 memory_size = 100 << 10; // 100 KiB 508 memory_size = 64 << 10; // 64 KiB
509 metrics_name = "PpapiBrokerMetrics"; 509 metrics_name = "PpapiBrokerMetrics";
510 break; 510 break;
511 511
512 default: 512 default:
513 UMA_HISTOGRAM_ENUMERATION( 513 UMA_HISTOGRAM_ENUMERATION(
514 "UMA.SubprocessMetricsProvider.UntrackedProcesses", 514 "UMA.SubprocessMetricsProvider.UntrackedProcesses",
515 data_.process_type, PROCESS_TYPE_CONTENT_END); 515 data_.process_type, PROCESS_TYPE_CONTENT_END);
516 return; 516 return;
517 } 517 }
518 518
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 #if defined(OS_WIN) 606 #if defined(OS_WIN)
607 607
608 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 608 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
609 OnChildDisconnected(); 609 OnChildDisconnected();
610 } 610 }
611 611
612 #endif 612 #endif
613 613
614 } // namespace content 614 } // 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