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

Side by Side Diff: Source/core/inspector/InspectorTimelineAgent.h

Issue 235043002: TimelinePanel: make GC events synchronous. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 6 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "platform/PlatformInstrumentation.h" 43 #include "platform/PlatformInstrumentation.h"
44 #include "platform/geometry/LayoutRect.h" 44 #include "platform/geometry/LayoutRect.h"
45 #include "wtf/HashMap.h" 45 #include "wtf/HashMap.h"
46 #include "wtf/HashSet.h" 46 #include "wtf/HashSet.h"
47 #include "wtf/PassOwnPtr.h" 47 #include "wtf/PassOwnPtr.h"
48 #include "wtf/Vector.h" 48 #include "wtf/Vector.h"
49 #include "wtf/WeakPtr.h" 49 #include "wtf/WeakPtr.h"
50 50
51 namespace WebCore { 51 namespace WebCore {
52 struct FetchInitiatorInfo; 52 struct FetchInitiatorInfo;
53 struct TimelineGCEvent;
54 struct TimelineImageInfo; 53 struct TimelineImageInfo;
55 struct TimelineThreadState; 54 struct TimelineThreadState;
56 struct TimelineRecordEntry; 55 struct TimelineRecordEntry;
57 56
58 class DOMWindow; 57 class DOMWindow;
59 class Document; 58 class Document;
60 class DocumentLoader; 59 class DocumentLoader;
61 class Event; 60 class Event;
62 class ExecutionContext; 61 class ExecutionContext;
63 class FloatQuad; 62 class FloatQuad;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 260
262 void sendEvent(PassRefPtr<TypeBuilder::Timeline::TimelineEvent>); 261 void sendEvent(PassRefPtr<TypeBuilder::Timeline::TimelineEvent>);
263 void appendRecord(PassRefPtr<JSONObject> data, const String& type, bool capt ureCallStack, LocalFrame*); 262 void appendRecord(PassRefPtr<JSONObject> data, const String& type, bool capt ureCallStack, LocalFrame*);
264 void pushCurrentRecord(PassRefPtr<JSONObject> data, const String& type, bool captureCallStack, LocalFrame*, bool hasLowLevelDetails = false); 263 void pushCurrentRecord(PassRefPtr<JSONObject> data, const String& type, bool captureCallStack, LocalFrame*, bool hasLowLevelDetails = false);
265 TimelineThreadState& threadState(ThreadIdentifier); 264 TimelineThreadState& threadState(ThreadIdentifier);
266 265
267 void setCounters(TypeBuilder::Timeline::TimelineEvent*); 266 void setCounters(TypeBuilder::Timeline::TimelineEvent*);
268 void setFrameIdentifier(TypeBuilder::Timeline::TimelineEvent* record, LocalF rame*); 267 void setFrameIdentifier(TypeBuilder::Timeline::TimelineEvent* record, LocalF rame*);
269 void populateImageDetails(JSONObject* data, const RenderImage&); 268 void populateImageDetails(JSONObject* data, const RenderImage&);
270 269
271 void pushGCEventRecords();
272
273 void didCompleteCurrentRecord(const String& type); 270 void didCompleteCurrentRecord(const String& type);
274 void unwindRecordStack(); 271 void unwindRecordStack();
275 272
276 void commitFrameRecord(); 273 void commitFrameRecord();
277 274
278 void addRecordToTimeline(PassRefPtr<TypeBuilder::Timeline::TimelineEvent>, d ouble ts); 275 void addRecordToTimeline(PassRefPtr<TypeBuilder::Timeline::TimelineEvent>, d ouble ts);
279 void innerAddRecordToTimeline(PassRefPtr<TypeBuilder::Timeline::TimelineEven t>); 276 void innerAddRecordToTimeline(PassRefPtr<TypeBuilder::Timeline::TimelineEven t>);
280 void clearRecordStack(); 277 void clearRecordStack();
281 PassRefPtr<TypeBuilder::Timeline::TimelineEvent> createRecordForEvent(const TraceEventDispatcher::TraceEvent&, const String& type, PassRefPtr<JSONObject> da ta); 278 PassRefPtr<TypeBuilder::Timeline::TimelineEvent> createRecordForEvent(const TraceEventDispatcher::TraceEvent&, const String& type, PassRefPtr<JSONObject> da ta);
282 279
(...skipping 21 matching lines...) Expand all
304 301
305 int m_id; 302 int m_id;
306 unsigned long long m_layerTreeId; 303 unsigned long long m_layerTreeId;
307 304
308 int m_maxCallStackDepth; 305 int m_maxCallStackDepth;
309 306
310 Vector<TimelineRecordEntry> m_recordStack; 307 Vector<TimelineRecordEntry> m_recordStack;
311 RefPtr<TypeBuilder::Array<TypeBuilder::Timeline::TimelineEvent> > m_buffered Events; 308 RefPtr<TypeBuilder::Array<TypeBuilder::Timeline::TimelineEvent> > m_buffered Events;
312 Vector<String> m_consoleTimelines; 309 Vector<String> m_consoleTimelines;
313 310
314 typedef Vector<TimelineGCEvent> GCEvents;
315 GCEvents m_gcEvents;
316 unsigned m_platformInstrumentationClientInstalledAtStackDepth; 311 unsigned m_platformInstrumentationClientInstalledAtStackDepth;
317 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingFrameRecord; 312 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingFrameRecord;
318 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingGPURecord; 313 RefPtr<TypeBuilder::Timeline::TimelineEvent> m_pendingGPURecord;
319 typedef HashMap<unsigned long long, TimelineImageInfo> PixelRefToImageInfoMa p; 314 typedef HashMap<unsigned long long, TimelineImageInfo> PixelRefToImageInfoMa p;
320 PixelRefToImageInfoMap m_pixelRefToImageInfo; 315 PixelRefToImageInfoMap m_pixelRefToImageInfo;
321 RenderImage* m_imageBeingPainted; 316 RenderImage* m_imageBeingPainted;
322 HashMap<unsigned long long, long long> m_layerToNodeMap; 317 HashMap<unsigned long long, long long> m_layerToNodeMap;
323 double m_paintSetupStart; 318 double m_paintSetupStart;
324 double m_paintSetupEnd; 319 double m_paintSetupEnd;
325 RefPtr<JSONObject> m_gpuTask; 320 RefPtr<JSONObject> m_gpuTask;
326 unsigned m_styleRecalcElementCounter; 321 unsigned m_styleRecalcElementCounter;
327 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap; 322 typedef HashMap<ThreadIdentifier, TimelineThreadState> ThreadStateMap;
328 ThreadStateMap m_threadStates; 323 ThreadStateMap m_threadStates;
329 bool m_mayEmitFirstPaint; 324 bool m_mayEmitFirstPaint;
330 HashSet<String> m_liveEvents; 325 HashSet<String> m_liveEvents;
331 double m_lastProgressTimestamp; 326 double m_lastProgressTimestamp;
332 }; 327 };
333 328
334 } // namespace WebCore 329 } // namespace WebCore
335 330
336 #endif // !defined(InspectorTimelineAgent_h) 331 #endif // !defined(InspectorTimelineAgent_h)
OLDNEW
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-gc-event-expected.txt ('k') | Source/core/inspector/InspectorTimelineAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698