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

Side by Side Diff: Source/bindings/v8/ScriptProfiler.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 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
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.h ('k') | Source/bindings/v8/ScriptWrappable.h » ('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) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, 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 21 matching lines...) Expand all
32 #include "ScriptProfiler.h" 32 #include "ScriptProfiler.h"
33 33
34 #include "BindingVisitors.h" 34 #include "BindingVisitors.h"
35 #include "RetainedDOMInfo.h" 35 #include "RetainedDOMInfo.h"
36 #include "ScriptObject.h" 36 #include "ScriptObject.h"
37 #include "V8ArrayBufferView.h" 37 #include "V8ArrayBufferView.h"
38 #include "V8Binding.h" 38 #include "V8Binding.h"
39 #include "V8DOMWindow.h" 39 #include "V8DOMWindow.h"
40 #include "V8DOMWrapper.h" 40 #include "V8DOMWrapper.h"
41 #include "V8Node.h" 41 #include "V8Node.h"
42 #include "WebCoreMemoryInstrumentation.h"
43 #include "WrapperTypeInfo.h" 42 #include "WrapperTypeInfo.h"
44 43
45 #include <v8-profiler.h> 44 #include <v8-profiler.h>
46 45
47 #include <wtf/ThreadSpecific.h> 46 #include <wtf/ThreadSpecific.h>
48 47
49 namespace WebCore { 48 namespace WebCore {
50 49
51 typedef HashMap<String, double> ProfileNameIdleTimeMap; 50 typedef HashMap<String, double> ProfileNameIdleTimeMap;
52 51
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 m_visitor->visitJSExternalArray(V8ArrayBufferView::toNative(wrapper) ); 289 m_visitor->visitJSExternalArray(V8ArrayBufferView::toNative(wrapper) );
291 } 290 }
292 291
293 private: 292 private:
294 ExternalArrayVisitor* m_visitor; 293 ExternalArrayVisitor* m_visitor;
295 } wrapperVisitor(visitor); 294 } wrapperVisitor(visitor);
296 295
297 v8::V8::VisitHandlesWithClassIds(&wrapperVisitor); 296 v8::V8::VisitHandlesWithClassIds(&wrapperVisitor);
298 } 297 }
299 298
300 void ScriptProfiler::collectBindingMemoryInfo(MemoryInstrumentation* instrumenta tion)
301 {
302 V8PerIsolateData* data = V8PerIsolateData::current();
303 instrumentation->addRootObject(data);
304 }
305
306 size_t ScriptProfiler::profilerSnapshotsSize() 299 size_t ScriptProfiler::profilerSnapshotsSize()
307 { 300 {
308 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 301 v8::Isolate* isolate = v8::Isolate::GetCurrent();
309 v8::HeapProfiler* profiler = isolate->GetHeapProfiler(); 302 v8::HeapProfiler* profiler = isolate->GetHeapProfiler();
310 if (!profiler) 303 if (!profiler)
311 return 0; 304 return 0;
312 return profiler->GetProfilerMemorySize(); 305 return profiler->GetProfilerMemorySize();
313 } 306 }
314 307
315 ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap() 308 ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap()
316 { 309 {
317 AtomicallyInitializedStatic(WTF::ThreadSpecific<ProfileNameIdleTimeMap>*, ma p = new WTF::ThreadSpecific<ProfileNameIdleTimeMap>); 310 AtomicallyInitializedStatic(WTF::ThreadSpecific<ProfileNameIdleTimeMap>*, ma p = new WTF::ThreadSpecific<ProfileNameIdleTimeMap>);
318 return *map; 311 return *map;
319 } 312 }
320 313
321 } // namespace WebCore 314 } // namespace WebCore
322 315
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.h ('k') | Source/bindings/v8/ScriptWrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698