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

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

Issue 2967063002: Don't report 'custom' processes as untracked. (Closed)
Patch Set: record all untracked sub-processes in sparse histogram but renumber 'custom' ones Created 3 years, 5 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
« no previous file with comments | « no previous file | tools/metrics/histograms/enums.xml » ('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) 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/alias.h" 10 #include "base/debug/alias.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 memory_size = 64 << 10; // 64 KiB 492 memory_size = 64 << 10; // 64 KiB
493 metrics_name = "PpapiPluginMetrics"; 493 metrics_name = "PpapiPluginMetrics";
494 break; 494 break;
495 495
496 case PROCESS_TYPE_PPAPI_BROKER: 496 case PROCESS_TYPE_PPAPI_BROKER:
497 memory_size = 64 << 10; // 64 KiB 497 memory_size = 64 << 10; // 64 KiB
498 metrics_name = "PpapiBrokerMetrics"; 498 metrics_name = "PpapiBrokerMetrics";
499 break; 499 break;
500 500
501 default: 501 default:
502 UMA_HISTOGRAM_ENUMERATION( 502 // Report new processes. "Custom" ones are renumbered to 1000+ so that
503 "UMA.SubprocessMetricsProvider.UntrackedProcesses", 503 // they won't conflict with any standard ones in the future.
504 data_.process_type, PROCESS_TYPE_CONTENT_END); 504 int process_type = data_.process_type;
505 if (process_type >= PROCESS_TYPE_CONTENT_END)
506 process_type += 1000 - PROCESS_TYPE_CONTENT_END;
507 UMA_HISTOGRAM_SPARSE_SLOWLY(
508 "UMA.SubprocessMetricsProvider.UntrackedProcesses", process_type);
505 return; 509 return;
506 } 510 }
507 511
508 // Create the shared memory segment and attach an allocator to it. 512 // Create the shared memory segment and attach an allocator to it.
509 // Mapping the memory shouldn't fail but be safe if it does; everything 513 // Mapping the memory shouldn't fail but be safe if it does; everything
510 // will continue to work but just as if persistence weren't available. 514 // will continue to work but just as if persistence weren't available.
511 std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory()); 515 std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory());
512 if (!shm->CreateAndMapAnonymous(memory_size)) 516 if (!shm->CreateAndMapAnonymous(memory_size))
513 return; 517 return;
514 metrics_allocator_.reset(new base::SharedPersistentMemoryAllocator( 518 metrics_allocator_.reset(new base::SharedPersistentMemoryAllocator(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 601
598 #if defined(OS_WIN) 602 #if defined(OS_WIN)
599 603
600 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 604 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
601 OnChildDisconnected(); 605 OnChildDisconnected();
602 } 606 }
603 607
604 #endif 608 #endif
605 609
606 } // namespace content 610 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698