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

Side by Side Diff: Source/platform/heap/ThreadState.cpp

Issue 1321173002: Oilpan: fix building with blink_gc_profiling:1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/heap/HeapPage.cpp ('k') | no next file » | 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 json->endArray(); 439 json->endArray();
440 #undef SNAPSHOT_HEAP 440 #undef SNAPSHOT_HEAP
441 441
442 json->setInteger("allocatedSpace", Heap::allocatedSpace()); 442 json->setInteger("allocatedSpace", Heap::allocatedSpace());
443 json->setInteger("objectSpace", Heap::allocatedObjectSize()); 443 json->setInteger("objectSpace", Heap::allocatedObjectSize());
444 json->setInteger("pageCount", info.pageCount); 444 json->setInteger("pageCount", info.pageCount);
445 json->setInteger("freeSize", info.freeSize); 445 json->setInteger("freeSize", info.freeSize);
446 446
447 Vector<String> classNameVector(info.classTags.size()); 447 Vector<String> classNameVector(info.classTags.size());
448 for (SnapshotInfo::ClassTagMap::iterator it = info.classTags.begin(); it != info.classTags.end(); ++it) 448 for (SnapshotInfo::ClassTagMap::iterator it = info.classTags.begin(); it != info.classTags.end(); ++it)
449 classNameVector[it->value] = it->key->m_className; 449 classNameVector[it->value] = it->key->className();
450 450
451 size_t liveSize = 0; 451 size_t liveSize = 0;
452 size_t deadSize = 0; 452 size_t deadSize = 0;
453 json->beginArray("classes"); 453 json->beginArray("classes");
454 for (size_t i = 0; i < classNameVector.size(); ++i) { 454 for (size_t i = 0; i < classNameVector.size(); ++i) {
455 json->beginDictionary(); 455 json->beginDictionary();
456 json->setString("name", classNameVector[i]); 456 json->setString("name", classNameVector[i]);
457 json->setInteger("liveCount", info.liveCount[i]); 457 json->setInteger("liveCount", info.liveCount[i]);
458 json->setInteger("deadCount", info.deadCount[i]); 458 json->setInteger("deadCount", info.deadCount[i]);
459 json->setInteger("liveSize", info.liveSize[i]); 459 json->setInteger("liveSize", info.liveSize[i]);
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 json->beginArray(it->key.ascii().data()); 1607 json->beginArray(it->key.ascii().data());
1608 for (size_t age = 0; age <= maxHeapObjectAge; ++age) 1608 for (size_t age = 0; age <= maxHeapObjectAge; ++age)
1609 json->pushInteger(it->value.ages[age]); 1609 json->pushInteger(it->value.ages[age]);
1610 json->endArray(); 1610 json->endArray();
1611 } 1611 }
1612 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); 1612 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release());
1613 } 1613 }
1614 #endif 1614 #endif
1615 1615
1616 } // namespace blink 1616 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/HeapPage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698