| 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 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 { | 1377 { |
| 1378 ASSERT(isInGC()); | 1378 ASSERT(isInGC()); |
| 1379 | 1379 |
| 1380 int numberOfHeapsReported = 0; | 1380 int numberOfHeapsReported = 0; |
| 1381 #define SNAPSHOT_HEAP(HeapType)
\ | 1381 #define SNAPSHOT_HEAP(HeapType)
\ |
| 1382 {
\ | 1382 {
\ |
| 1383 numberOfHeapsReported++;
\ | 1383 numberOfHeapsReported++;
\ |
| 1384 String allocatorBaseName;
\ | 1384 String allocatorBaseName;
\ |
| 1385 allocatorBaseName = String::format("blink_gc/thread_%lu/heaps/" #HeapTyp
e, (unsigned long)(m_thread)); \ | 1385 allocatorBaseName = String::format("blink_gc/thread_%lu/heaps/" #HeapTyp
e, (unsigned long)(m_thread)); \ |
| 1386 m_heaps[HeapType##HeapIndex]->takeSnapshot(allocatorBaseName);
\ | 1386 m_heaps[HeapType##HeapIndex]->takeSnapshot(allocatorBaseName);
\ |
| 1387 m_heaps[HeapType##HeapIndex]->takeFreelistSnapshot(allocatorBaseName);
\ |
| 1387 } | 1388 } |
| 1388 | 1389 |
| 1389 SNAPSHOT_HEAP(NormalPage1); | 1390 SNAPSHOT_HEAP(NormalPage1); |
| 1390 SNAPSHOT_HEAP(NormalPage2); | 1391 SNAPSHOT_HEAP(NormalPage2); |
| 1391 SNAPSHOT_HEAP(NormalPage3); | 1392 SNAPSHOT_HEAP(NormalPage3); |
| 1392 SNAPSHOT_HEAP(NormalPage4); | 1393 SNAPSHOT_HEAP(NormalPage4); |
| 1393 SNAPSHOT_HEAP(EagerSweep); | 1394 SNAPSHOT_HEAP(EagerSweep); |
| 1394 SNAPSHOT_HEAP(Vector1); | 1395 SNAPSHOT_HEAP(Vector1); |
| 1395 SNAPSHOT_HEAP(Vector2); | 1396 SNAPSHOT_HEAP(Vector2); |
| 1396 SNAPSHOT_HEAP(Vector3); | 1397 SNAPSHOT_HEAP(Vector3); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 json->beginArray(it->key.ascii().data()); | 1496 json->beginArray(it->key.ascii().data()); |
| 1496 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1497 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
| 1497 json->pushInteger(it->value.ages[age]); | 1498 json->pushInteger(it->value.ages[age]); |
| 1498 json->endArray(); | 1499 json->endArray(); |
| 1499 } | 1500 } |
| 1500 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1501 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
| 1501 } | 1502 } |
| 1502 #endif | 1503 #endif |
| 1503 | 1504 |
| 1504 } // namespace blink | 1505 } // namespace blink |
| OLD | NEW |