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

Side by Side Diff: Source/wtf/PartitionAlloc.h

Issue 1165703010: PartitionAlloc: improve how statistics appear in chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove numeric prefix hacks. Created 5 years, 6 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 | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 PartitionAllocReturnNull = 1 << 0, 342 PartitionAllocReturnNull = 1 << 0,
343 }; 343 };
344 344
345 // Struct used to retrieve memory statistics about a partition bucket. Used by 345 // Struct used to retrieve memory statistics about a partition bucket. Used by
346 // PartitionStatsDumper implementation. 346 // PartitionStatsDumper implementation.
347 struct PartitionBucketMemoryStats { 347 struct PartitionBucketMemoryStats {
348 bool isValid; // Used to check if the stats is valid. 348 bool isValid; // Used to check if the stats is valid.
349 bool isDirectMap; // True if this is a direct mapping; size will not be uniq ue. 349 bool isDirectMap; // True if this is a direct mapping; size will not be uniq ue.
350 uint32_t bucketSlotSize; // The size of the slot in bytes. 350 uint32_t bucketSlotSize; // The size of the slot in bytes.
351 uint32_t allocatedPageSize; // Total size the partition page allocated from the system. 351 uint32_t allocatedPageSize; // Total size the partition page allocated from the system.
352 uint32_t pageWasteSize; // The bytes allocated from the system but can't be used in any slot in a partition page.
353 uint32_t activeBytes; // Total active bytes used in the bucket. 352 uint32_t activeBytes; // Total active bytes used in the bucket.
354 uint32_t residentBytes; // Total bytes provisioned in the bucket. 353 uint32_t residentBytes; // Total bytes provisioned in the bucket.
355 uint32_t freeableBytes; // Total bytes that could be decommitted. 354 uint32_t freeableBytes; // Total bytes that could be decommitted.
356 uint32_t numFullPages; // Number of pages with all slots allocated. 355 uint32_t numFullPages; // Number of pages with all slots allocated.
357 uint32_t numActivePages; // Number of pages that have at least one provision ed slot. 356 uint32_t numActivePages; // Number of pages that have at least one provision ed slot.
358 uint32_t numEmptyPages; // Number of pages that areempty but not decommitted . 357 uint32_t numEmptyPages; // Number of pages that are empty but not decommitte d.
359 uint32_t numDecommittedPages; // Number of pages that are empty and decommit ted. 358 uint32_t numDecommittedPages; // Number of pages that are empty and decommit ted.
360 }; 359 };
361 360
362 // Interface that is passed to partitionDumpStats and 361 // Interface that is passed to partitionDumpStats and
363 // partitionDumpStatsGeneric for using the memory statistics. 362 // partitionDumpStatsGeneric for using the memory statistics.
364 class WTF_EXPORT PartitionStatsDumper { 363 class WTF_EXPORT PartitionStatsDumper {
365 public: 364 public:
366 virtual void partitionsDumpBucketStats(const char* partitionName, const Part itionBucketMemoryStats*) = 0; 365 virtual void partitionsDumpBucketStats(const char* partitionName, const Part itionBucketMemoryStats*) = 0;
367 }; 366 };
368 367
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 using WTF::partitionAlloc; 730 using WTF::partitionAlloc;
732 using WTF::partitionFree; 731 using WTF::partitionFree;
733 using WTF::partitionAllocGeneric; 732 using WTF::partitionAllocGeneric;
734 using WTF::partitionFreeGeneric; 733 using WTF::partitionFreeGeneric;
735 using WTF::partitionReallocGeneric; 734 using WTF::partitionReallocGeneric;
736 using WTF::partitionAllocActualSize; 735 using WTF::partitionAllocActualSize;
737 using WTF::partitionAllocSupportsGetSize; 736 using WTF::partitionAllocSupportsGetSize;
738 using WTF::partitionAllocGetSize; 737 using WTF::partitionAllocGetSize;
739 738
740 #endif // WTF_PartitionAlloc_h 739 #endif // WTF_PartitionAlloc_h
OLDNEW
« no previous file with comments | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698