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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 } | 669 } |
670 | 670 |
671 void ThreadState::scheduleIdleLazySweep() | 671 void ThreadState::scheduleIdleLazySweep() |
672 { | 672 { |
673 // Idle complete sweep is supported only in the main thread. | 673 // Idle complete sweep is supported only in the main thread. |
674 if (!isMainThread()) | 674 if (!isMainThread()) |
675 return; | 675 return; |
676 | 676 |
677 // TODO(haraken): Remove this. Lazy sweeping is not yet enabled in non-oilpa
n builds. | 677 // TODO(haraken): Remove this. Lazy sweeping is not yet enabled in non-oilpa
n builds. |
678 #if ENABLE(OILPAN) | 678 #if ENABLE(OILPAN) |
679 Scheduler::shared()->postIdleTask(FROM_HERE, WTF::bind<double>(&ThreadState:
:performIdleLazySweep, this)); | 679 Platform::current()->currentThread()->scheduler()->postIdleTask(FROM_HERE, W
TF::bind<double>(&ThreadState::performIdleLazySweep, this)); |
680 #endif | 680 #endif |
681 } | 681 } |
682 | 682 |
683 void ThreadState::schedulePreciseGC() | 683 void ThreadState::schedulePreciseGC() |
684 { | 684 { |
685 if (isSweepingInProgress()) { | 685 if (isSweepingInProgress()) { |
686 setGCState(SweepingAndPreciseGCScheduled); | 686 setGCState(SweepingAndPreciseGCScheduled); |
687 return; | 687 return; |
688 } | 688 } |
689 | 689 |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 json->beginArray(it->key.ascii().data()); | 1292 json->beginArray(it->key.ascii().data()); |
1293 for (size_t age = 0; age <= maxHeapObjectAge; ++age) | 1293 for (size_t age = 0; age <= maxHeapObjectAge; ++age) |
1294 json->pushInteger(it->value.ages[age]); | 1294 json->pushInteger(it->value.ages[age]); |
1295 json->endArray(); | 1295 json->endArray(); |
1296 } | 1296 } |
1297 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); | 1297 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s
tatsName, this, json.release()); |
1298 } | 1298 } |
1299 #endif | 1299 #endif |
1300 | 1300 |
1301 } // namespace blink | 1301 } // namespace blink |
OLD | NEW |