| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "heap-profiler.h" | 46 #include "heap-profiler.h" |
| 47 #include "heap-snapshot-generator-inl.h" | 47 #include "heap-snapshot-generator-inl.h" |
| 48 #include "icu_util.h" | 48 #include "icu_util.h" |
| 49 #include "json-parser.h" | 49 #include "json-parser.h" |
| 50 #include "messages.h" | 50 #include "messages.h" |
| 51 #ifdef COMPRESS_STARTUP_DATA_BZ2 | 51 #ifdef COMPRESS_STARTUP_DATA_BZ2 |
| 52 #include "natives.h" | 52 #include "natives.h" |
| 53 #endif | 53 #endif |
| 54 #include "parser.h" | 54 #include "parser.h" |
| 55 #include "platform.h" | 55 #include "platform.h" |
| 56 #include "platform/time.h" |
| 56 #include "profile-generator-inl.h" | 57 #include "profile-generator-inl.h" |
| 57 #include "property-details.h" | 58 #include "property-details.h" |
| 58 #include "property.h" | 59 #include "property.h" |
| 59 #include "runtime.h" | 60 #include "runtime.h" |
| 60 #include "runtime-profiler.h" | 61 #include "runtime-profiler.h" |
| 61 #include "scanner-character-streams.h" | 62 #include "scanner-character-streams.h" |
| 62 #include "snapshot.h" | 63 #include "snapshot.h" |
| 63 #include "unicode-inl.h" | 64 #include "unicode-inl.h" |
| 64 #include "v8threads.h" | 65 #include "v8threads.h" |
| 65 #include "version.h" | 66 #include "version.h" |
| (...skipping 7275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7341 int CpuProfile::GetSamplesCount() const { | 7342 int CpuProfile::GetSamplesCount() const { |
| 7342 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); | 7343 return reinterpret_cast<const i::CpuProfile*>(this)->samples_count(); |
| 7343 } | 7344 } |
| 7344 | 7345 |
| 7345 | 7346 |
| 7346 int CpuProfiler::GetProfileCount() { | 7347 int CpuProfiler::GetProfileCount() { |
| 7347 return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount(); | 7348 return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount(); |
| 7348 } | 7349 } |
| 7349 | 7350 |
| 7350 | 7351 |
| 7352 void CpuProfiler::SetSamplingInterval(int us) { |
| 7353 ASSERT(us >= 0); |
| 7354 return reinterpret_cast<i::CpuProfiler*>(this)->set_sampling_interval( |
| 7355 i::TimeDelta::FromMicroseconds(us)); |
| 7356 } |
| 7357 |
| 7358 |
| 7351 const CpuProfile* CpuProfiler::GetCpuProfile(int index) { | 7359 const CpuProfile* CpuProfiler::GetCpuProfile(int index) { |
| 7352 return reinterpret_cast<const CpuProfile*>( | 7360 return reinterpret_cast<const CpuProfile*>( |
| 7353 reinterpret_cast<i::CpuProfiler*>(this)->GetProfile(index)); | 7361 reinterpret_cast<i::CpuProfiler*>(this)->GetProfile(index)); |
| 7354 } | 7362 } |
| 7355 | 7363 |
| 7356 | 7364 |
| 7357 void CpuProfiler::StartCpuProfiling(Handle<String> title, bool record_samples) { | 7365 void CpuProfiler::StartCpuProfiling(Handle<String> title, bool record_samples) { |
| 7358 reinterpret_cast<i::CpuProfiler*>(this)->StartProfiling( | 7366 reinterpret_cast<i::CpuProfiler*>(this)->StartProfiling( |
| 7359 *Utils::OpenHandle(*title), record_samples); | 7367 *Utils::OpenHandle(*title), record_samples); |
| 7360 } | 7368 } |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7882 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7890 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7883 Address callback_address = | 7891 Address callback_address = |
| 7884 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7892 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7885 VMState<EXTERNAL> state(isolate); | 7893 VMState<EXTERNAL> state(isolate); |
| 7886 ExternalCallbackScope call_scope(isolate, callback_address); | 7894 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7887 return callback(info); | 7895 return callback(info); |
| 7888 } | 7896 } |
| 7889 | 7897 |
| 7890 | 7898 |
| 7891 } } // namespace v8::internal | 7899 } } // namespace v8::internal |
| OLD | NEW |