OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
337 } | 337 } |
338 // TODO(haraken): Remove this. See the comment in gcPrologue. | 338 // TODO(haraken): Remove this. See the comment in gcPrologue. |
339 if (ThreadState::current()) | 339 if (ThreadState::current()) |
340 ThreadState::current()->scheduleV8FollowupGCIfNeeded(BlinkGC::V8Mino rGC); | 340 ThreadState::current()->scheduleV8FollowupGCIfNeeded(BlinkGC::V8Mino rGC); |
341 break; | 341 break; |
342 case v8::kGCTypeMarkSweepCompact: | 342 case v8::kGCTypeMarkSweepCompact: |
343 TRACE_EVENT_END1("devtools.timeline,v8", "MajorGC", "usedHeapSizeAfter", usedHeapSize(isolate)); | 343 TRACE_EVENT_END1("devtools.timeline,v8", "MajorGC", "usedHeapSizeAfter", usedHeapSize(isolate)); |
344 if (isMainThread()) { | 344 if (isMainThread()) { |
345 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(V8PerIsolateData::from(isola te)->previousSamplingState()); | 345 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(V8PerIsolateData::from(isola te)->previousSamplingState()); |
346 } | 346 } |
347 if (ThreadState::current()) | |
sof
2016/02/01 14:41:48
What does the switch to scheduling via kGCTypeMark
haraken
2016/02/01 15:05:57
V8 is now making a change not to invoke kGCTypePro
| |
348 ThreadState::current()->scheduleV8FollowupGCIfNeeded(BlinkGC::V8Majo rGC); | |
347 break; | 349 break; |
348 case v8::kGCTypeIncrementalMarking: | 350 case v8::kGCTypeIncrementalMarking: |
349 TRACE_EVENT_END1("devtools.timeline,v8", "MajorGC", "usedHeapSizeAfter", usedHeapSize(isolate)); | 351 TRACE_EVENT_END1("devtools.timeline,v8", "MajorGC", "usedHeapSizeAfter", usedHeapSize(isolate)); |
350 if (isMainThread()) { | 352 if (isMainThread()) { |
351 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(V8PerIsolateData::from(isola te)->previousSamplingState()); | 353 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(V8PerIsolateData::from(isola te)->previousSamplingState()); |
352 } | 354 } |
353 break; | 355 break; |
354 case v8::kGCTypeProcessWeakCallbacks: | 356 case v8::kGCTypeProcessWeakCallbacks: |
355 TRACE_EVENT_END1("devtools.timeline,v8", "MajorGC", "usedHeapSizeAfter", usedHeapSize(isolate)); | 357 TRACE_EVENT_END1("devtools.timeline,v8", "MajorGC", "usedHeapSizeAfter", usedHeapSize(isolate)); |
356 if (isMainThread()) { | 358 if (isMainThread()) { |
357 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(V8PerIsolateData::from(isola te)->previousSamplingState()); | 359 TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(V8PerIsolateData::from(isola te)->previousSamplingState()); |
358 } | 360 } |
359 // TODO(haraken): Remove this. See the comment in gcPrologue. | |
360 if (ThreadState::current()) | |
361 ThreadState::current()->scheduleV8FollowupGCIfNeeded(BlinkGC::V8Majo rGC); | |
362 break; | 361 break; |
363 default: | 362 default: |
364 ASSERT_NOT_REACHED(); | 363 ASSERT_NOT_REACHED(); |
365 } | 364 } |
366 | 365 |
367 if (isMainThread()) | 366 if (isMainThread()) |
368 ScriptForbiddenScope::exit(); | 367 ScriptForbiddenScope::exit(); |
369 | 368 |
370 // v8::kGCCallbackFlagForced forces a Blink heap garbage collection | 369 // v8::kGCCallbackFlagForced forces a Blink heap garbage collection |
371 // when a garbage collection was forced from V8. This is either used | 370 // when a garbage collection was forced from V8. This is either used |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 Visitor* m_visitor; | 452 Visitor* m_visitor; |
454 }; | 453 }; |
455 | 454 |
456 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) | 455 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) |
457 { | 456 { |
458 DOMWrapperTracer tracer(visitor); | 457 DOMWrapperTracer tracer(visitor); |
459 isolate->VisitHandlesWithClassIds(&tracer); | 458 isolate->VisitHandlesWithClassIds(&tracer); |
460 } | 459 } |
461 | 460 |
462 } // namespace blink | 461 } // namespace blink |
OLD | NEW |