| 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(EagerSweep); |
| 419 SNAPSHOT_HEAP(NormalPage1); |
| 420 SNAPSHOT_HEAP(NormalPage2); |
| 421 SNAPSHOT_HEAP(NormalPage3); |
| 422 SNAPSHOT_HEAP(NormalPage4); |
| 419 SNAPSHOT_HEAP(Vector1); | 423 SNAPSHOT_HEAP(Vector1); |
| 420 SNAPSHOT_HEAP(Vector2); | 424 SNAPSHOT_HEAP(Vector2); |
| 421 SNAPSHOT_HEAP(Vector3); | 425 SNAPSHOT_HEAP(Vector3); |
| 422 SNAPSHOT_HEAP(Vector4); | 426 SNAPSHOT_HEAP(Vector4); |
| 423 SNAPSHOT_HEAP(InlineVector); | 427 SNAPSHOT_HEAP(InlineVector); |
| 424 SNAPSHOT_HEAP(HashTable); | 428 SNAPSHOT_HEAP(HashTable); |
| 425 SNAPSHOT_HEAP(LargeObject); | 429 SNAPSHOT_HEAP(LargeObject); |
| 426 FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); | 430 FOR_EACH_TYPED_HEAP(SNAPSHOT_HEAP); |
| 427 json->endArray(); | 431 json->endArray(); |
| 428 #undef SNAPSHOT_HEAP | 432 #undef SNAPSHOT_HEAP |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 | 1368 |
| 1365 #define SNAPSHOT_FREE_LIST(HeapType) \ | 1369 #define SNAPSHOT_FREE_LIST(HeapType) \ |
| 1366 { \ | 1370 { \ |
| 1367 json->beginDictionary(); \ | 1371 json->beginDictionary(); \ |
| 1368 json->setString("name", #HeapType); \ | 1372 json->setString("name", #HeapType); \ |
| 1369 m_heaps[HeapType##HeapIndex]->snapshotFreeList(*json); \ | 1373 m_heaps[HeapType##HeapIndex]->snapshotFreeList(*json); \ |
| 1370 json->endDictionary(); \ | 1374 json->endDictionary(); \ |
| 1371 } | 1375 } |
| 1372 | 1376 |
| 1373 json->beginArray("heaps"); | 1377 json->beginArray("heaps"); |
| 1374 SNAPSHOT_FREE_LIST(NormalPage); | 1378 SNAPSHOT_FREE_LIST(EagerSweep); |
| 1375 SNAPSHOT_FREE_LIST(Vector); | 1379 SNAPSHOT_FREE_LIST(NormalPage1); |
| 1380 SNAPSHOT_FREE_LIST(NormalPage2); |
| 1381 SNAPSHOT_FREE_LIST(NormalPage3); |
| 1382 SNAPSHOT_FREE_LIST(NormalPage4); |
| 1383 SNAPSHOT_FREE_LIST(Vector1); |
| 1384 SNAPSHOT_FREE_LIST(Vector2); |
| 1385 SNAPSHOT_FREE_LIST(Vector3); |
| 1386 SNAPSHOT_FREE_LIST(Vector4); |
| 1376 SNAPSHOT_FREE_LIST(InlineVector); | 1387 SNAPSHOT_FREE_LIST(InlineVector); |
| 1377 SNAPSHOT_FREE_LIST(HashTable); | 1388 SNAPSHOT_FREE_LIST(HashTable); |
| 1378 SNAPSHOT_FREE_LIST(LargeObject); | 1389 SNAPSHOT_FREE_LIST(LargeObject); |
| 1379 FOR_EACH_TYPED_HEAP(SNAPSHOT_FREE_LIST); | 1390 FOR_EACH_TYPED_HEAP(SNAPSHOT_FREE_LIST); |
| 1380 json->endArray(); | 1391 json->endArray(); |
| 1381 | 1392 |
| 1382 #undef SNAPSHOT_FREE_LIST | 1393 #undef SNAPSHOT_FREE_LIST |
| 1383 | 1394 |
| 1384 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), "
FreeList", this, json.release()); | 1395 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), "
FreeList", this, json.release()); |
| 1385 } | 1396 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1407 json->beginArray(it->key.ascii().data()); | 1418 json->beginArray(it->key.ascii().data()); |
| 1408 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1419 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
| 1409 json->pushInteger(it->value.ages[age]); | 1420 json->pushInteger(it->value.ages[age]); |
| 1410 json->endArray(); | 1421 json->endArray(); |
| 1411 } | 1422 } |
| 1412 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1423 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
| 1413 } | 1424 } |
| 1414 #endif | 1425 #endif |
| 1415 | 1426 |
| 1416 } // namespace blink | 1427 } // namespace blink |
| OLD | NEW |