Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 408 RefPtr<TracedValue> json = TracedValue::create(); | 408 RefPtr<TracedValue> json = TracedValue::create(); |
| 409 | 409 |
| 410 #define SNAPSHOT_HEAP(HeapType) \ | 410 #define SNAPSHOT_HEAP(HeapType) \ |
| 411 { \ | 411 { \ |
| 412 json->beginDictionary(); \ | 412 json->beginDictionary(); \ |
| 413 json->setString("name", #HeapType); \ | 413 json->setString("name", #HeapType); \ |
| 414 m_heaps[HeapType##HeapIndex]->snapshot(json.get(), &info); \ | 414 m_heaps[HeapType##HeapIndex]->snapshot(json.get(), &info); \ |
| 415 json->endDictionary(); \ | 415 json->endDictionary(); \ |
| 416 } | 416 } |
| 417 json->beginArray("heaps"); | 417 json->beginArray("heaps"); |
| 418 SNAPSHOT_HEAP(NormalPage); | 418 SNAPSHOT_HEAP(NormalPage1); |
|
haraken
2015/06/11 10:55:32
You need to add EagerSweepHeap! :)
Yuta Kitamura
2015/06/12 02:43:29
Done.
| |
| 419 SNAPSHOT_HEAP(NormalPage2); | |
| 420 SNAPSHOT_HEAP(NormalPage3); | |
| 421 SNAPSHOT_HEAP(NormalPage4); | |
| 419 SNAPSHOT_HEAP(Vector1); | 422 SNAPSHOT_HEAP(Vector1); |
| 420 SNAPSHOT_HEAP(Vector2); | 423 SNAPSHOT_HEAP(Vector2); |
| 421 SNAPSHOT_HEAP(Vector3); | 424 SNAPSHOT_HEAP(Vector3); |
| 422 SNAPSHOT_HEAP(Vector4); | 425 SNAPSHOT_HEAP(Vector4); |
| 423 SNAPSHOT_HEAP(InlineVector); | 426 SNAPSHOT_HEAP(InlineVector); |
| 424 SNAPSHOT_HEAP(HashTable); | 427 SNAPSHOT_HEAP(HashTable); |
| 425 SNAPSHOT_HEAP(LargeObject); | 428 SNAPSHOT_HEAP(LargeObject); |
| 426 FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); | 429 FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); |
| 427 json->endArray(); | 430 json->endArray(); |
| 428 #undef SNAPSHOT_HEAP | 431 #undef SNAPSHOT_HEAP |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1364 | 1367 |
| 1365 #define SNAPSHOT_FREE_LIST(HeapType) \ | 1368 #define SNAPSHOT_FREE_LIST(HeapType) \ |
| 1366 { \ | 1369 { \ |
| 1367 json->beginDictionary(); \ | 1370 json->beginDictionary(); \ |
| 1368 json->setString("name", #HeapType); \ | 1371 json->setString("name", #HeapType); \ |
| 1369 m_heaps[HeapType##HeapIndex]->snapshotFreeList(*json); \ | 1372 m_heaps[HeapType##HeapIndex]->snapshotFreeList(*json); \ |
| 1370 json->endDictionary(); \ | 1373 json->endDictionary(); \ |
| 1371 } | 1374 } |
| 1372 | 1375 |
| 1373 json->beginArray("heaps"); | 1376 json->beginArray("heaps"); |
| 1374 SNAPSHOT_FREE_LIST(NormalPage); | 1377 SNAPSHOT_FREE_LIST(NormalPage1); |
|
haraken
2015/06/11 10:55:32
Ditto.
Yuta Kitamura
2015/06/12 02:43:29
Done.
| |
| 1375 SNAPSHOT_FREE_LIST(Vector); | 1378 SNAPSHOT_FREE_LIST(NormalPage2); |
| 1379 SNAPSHOT_FREE_LIST(NormalPage3); | |
| 1380 SNAPSHOT_FREE_LIST(NormalPage4); | |
| 1381 SNAPSHOT_FREE_LIST(Vector1); | |
| 1382 SNAPSHOT_FREE_LIST(Vector2); | |
| 1383 SNAPSHOT_FREE_LIST(Vector3); | |
| 1384 SNAPSHOT_FREE_LIST(Vector4); | |
| 1376 SNAPSHOT_FREE_LIST(InlineVector); | 1385 SNAPSHOT_FREE_LIST(InlineVector); |
| 1377 SNAPSHOT_FREE_LIST(HashTable); | 1386 SNAPSHOT_FREE_LIST(HashTable); |
| 1378 SNAPSHOT_FREE_LIST(LargeObject); | 1387 SNAPSHOT_FREE_LIST(LargeObject); |
| 1379 FOR_EACH_TYPED_HEAP(SNAPSHOT_FREE_LIST); | 1388 FOR_EACH_TYPED_HEAP(SNAPSHOT_FREE_LIST); |
| 1380 json->endArray(); | 1389 json->endArray(); |
| 1381 | 1390 |
| 1382 #undef SNAPSHOT_FREE_LIST | 1391 #undef SNAPSHOT_FREE_LIST |
| 1383 | 1392 |
| 1384 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), " FreeList", this, json.release()); | 1393 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), " FreeList", this, json.release()); |
| 1385 } | 1394 } |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 1407 json->beginArray(it->key.ascii().data()); | 1416 json->beginArray(it->key.ascii().data()); |
| 1408 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1417 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
| 1409 json->pushInteger(it->value.ages[age]); | 1418 json->pushInteger(it->value.ages[age]); |
| 1410 json->endArray(); | 1419 json->endArray(); |
| 1411 } | 1420 } |
| 1412 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); | 1421 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); |
| 1413 } | 1422 } |
| 1414 #endif | 1423 #endif |
| 1415 | 1424 |
| 1416 } // namespace blink | 1425 } // namespace blink |
| OLD | NEW |