Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/platform/heap/ThreadState.h

Issue 559383002: Oilpan: Add trace events for the GC marking and sweeping phases. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 public: 272 public:
273 // When garbage collecting we need to know whether or not there 273 // When garbage collecting we need to know whether or not there
274 // can be pointers to Blink GC managed objects on the stack for 274 // can be pointers to Blink GC managed objects on the stack for
275 // each thread. When threads reach a safe point they record 275 // each thread. When threads reach a safe point they record
276 // whether or not they have pointers on the stack. 276 // whether or not they have pointers on the stack.
277 enum StackState { 277 enum StackState {
278 NoHeapPointersOnStack, 278 NoHeapPointersOnStack,
279 HeapPointersOnStack 279 HeapPointersOnStack
280 }; 280 };
281 281
282 // When profiling we would like to identify forced GC requests.
283 enum CauseOfGC {
284 NormalGC,
285 ForcedGC
286 };
287
282 class NoSweepScope { 288 class NoSweepScope {
283 public: 289 public:
284 explicit NoSweepScope(ThreadState* state) : m_state(state) 290 explicit NoSweepScope(ThreadState* state) : m_state(state)
285 { 291 {
286 ASSERT(!m_state->m_sweepInProgress); 292 ASSERT(!m_state->m_sweepInProgress);
287 m_state->m_sweepInProgress = true; 293 m_state->m_sweepInProgress = true;
288 } 294 }
289 ~NoSweepScope() 295 ~NoSweepScope()
290 { 296 {
291 ASSERT(m_state->m_sweepInProgress); 297 ASSERT(m_state->m_sweepInProgress);
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 // whether the page is part of a terminting thread or 847 // whether the page is part of a terminting thread or
842 // if the page is traced after being terminated (orphaned). 848 // if the page is traced after being terminated (orphaned).
843 uintptr_t m_terminating : 1; 849 uintptr_t m_terminating : 1;
844 uintptr_t m_tracedAfterOrphaned : 1; 850 uintptr_t m_tracedAfterOrphaned : 1;
845 uintptr_t m_promptlyFreedSize : 17; // == blinkPageSizeLog2 851 uintptr_t m_promptlyFreedSize : 17; // == blinkPageSizeLog2
846 }; 852 };
847 853
848 } 854 }
849 855
850 #endif // ThreadState_h 856 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698