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

Side by Side Diff: third_party/WebKit/public/platform/Platform.h

Issue 1406213005: [tracing] Add names to memory-infra dumpers for debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@memory-infra-runtime
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // Unlike enumeration histograms, sparse histograms only allocate memory for non-empty buckets. 569 // Unlike enumeration histograms, sparse histograms only allocate memory for non-empty buckets.
570 virtual void histogramSparse(const char* name, int sample) { } 570 virtual void histogramSparse(const char* name, int sample) { }
571 571
572 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o rg/developers/design-documents/rappor. 572 // Record to a RAPPOR privacy-preserving metric, see: https://www.chromium.o rg/developers/design-documents/rappor.
573 // recordRappor records a sample string, while recordRapporURL records the d omain and registry of a url. 573 // recordRappor records a sample string, while recordRapporURL records the d omain and registry of a url.
574 virtual void recordRappor(const char* metric, const WebString& sample) { } 574 virtual void recordRappor(const char* metric, const WebString& sample) { }
575 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) { } 575 virtual void recordRapporURL(const char* metric, const blink::WebURL& url) { }
576 576
577 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump 577 // Registers a memory dump provider. The WebMemoryDumpProvider::onMemoryDump
578 // method will be called on the same thread that called the 578 // method will be called on the same thread that called the
579 // registerMemoryDumpProvider() method. 579 // registerMemoryDumpProvider() method. |name| is used for debugging
580 // (duplicates are allowed) and must be a long-lived C string.
580 // See crbug.com/458295 for design docs. 581 // See crbug.com/458295 for design docs.
581 virtual void registerMemoryDumpProvider(blink::WebMemoryDumpProvider*) { } 582 virtual void registerMemoryDumpProvider(blink::WebMemoryDumpProvider*, const char* name) { }
582 583
583 // Must be called on the thread that called registerMemoryDumpProvider(). 584 // Must be called on the thread that called registerMemoryDumpProvider().
584 virtual void unregisterMemoryDumpProvider(blink::WebMemoryDumpProvider*) { } 585 virtual void unregisterMemoryDumpProvider(blink::WebMemoryDumpProvider*) { }
585 586
586 // Returns a newly allocated WebProcessMemoryDump instance. 587 // Returns a newly allocated WebProcessMemoryDump instance.
587 virtual blink::WebProcessMemoryDump* createProcessMemoryDump() { return null ptr; } 588 virtual blink::WebProcessMemoryDump* createProcessMemoryDump() { return null ptr; }
588 589
589 typedef uint64_t WebMemoryAllocatorDumpGuid; 590 typedef uint64_t WebMemoryAllocatorDumpGuid;
590 591
591 // Returns guid corresponding to the given string (the hash value) for 592 // Returns guid corresponding to the given string (the hash value) for
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 protected: 739 protected:
739 BLINK_PLATFORM_EXPORT Platform(); 740 BLINK_PLATFORM_EXPORT Platform();
740 virtual ~Platform() { } 741 virtual ~Platform() { }
741 742
742 WebThread* m_mainThread; 743 WebThread* m_mainThread;
743 }; 744 };
744 745
745 } // namespace blink 746 } // namespace blink
746 747
747 #endif 748 #endif
OLDNEW
« third_party/WebKit/Source/web/WebKit.cpp ('K') | « third_party/WebKit/Source/web/WebKit.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698