| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/extensions/statistics-extension.h" | 5 #include "src/extensions/statistics-extension.h" |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/counters.h" |
| 8 #include "src/heap/heap-inl.h" |
| 9 #include "src/isolate.h" |
| 10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! |
| 8 | 11 |
| 9 namespace v8 { | 12 namespace v8 { |
| 10 namespace internal { | 13 namespace internal { |
| 11 | 14 |
| 12 const char* const StatisticsExtension::kSource = | 15 const char* const StatisticsExtension::kSource = |
| 13 "native function getV8Statistics();"; | 16 "native function getV8Statistics();"; |
| 14 | 17 |
| 15 | 18 |
| 16 v8::Local<v8::FunctionTemplate> StatisticsExtension::GetNativeFunctionTemplate( | 19 v8::Local<v8::FunctionTemplate> StatisticsExtension::GetNativeFunctionTemplate( |
| 17 v8::Isolate* isolate, v8::Local<v8::String> str) { | 20 v8::Isolate* isolate, v8::Local<v8::String> str) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 137 } |
| 135 | 138 |
| 136 AddNumber64(args.GetIsolate(), result, | 139 AddNumber64(args.GetIsolate(), result, |
| 137 heap->amount_of_external_allocated_memory(), | 140 heap->amount_of_external_allocated_memory(), |
| 138 "amount_of_external_allocated_memory"); | 141 "amount_of_external_allocated_memory"); |
| 139 args.GetReturnValue().Set(result); | 142 args.GetReturnValue().Set(result); |
| 140 } | 143 } |
| 141 | 144 |
| 142 } // namespace internal | 145 } // namespace internal |
| 143 } // namespace v8 | 146 } // namespace v8 |
| OLD | NEW |