OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 using i::SmartPointer; | 49 using i::SmartPointer; |
50 using i::Vector; | 50 using i::Vector; |
51 | 51 |
52 | 52 |
53 // Helper methods | 53 // Helper methods |
54 static v8::Local<v8::Function> GetFunction(v8::Context* env, const char* name) { | 54 static v8::Local<v8::Function> GetFunction(v8::Context* env, const char* name) { |
55 return v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str(name))); | 55 return v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str(name))); |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 static int offset(const char* src, const char* substring) { | 59 static unsigned int offset(const char* src, const char* substring) { |
yurys
2015/03/30 20:33:16
unsigned int -> unsigned
loislo
2015/03/31 08:22:51
done
| |
60 return static_cast<int>(strstr(src, substring) - src); | 60 const char* it = strstr(src, substring); |
61 CHECK(it); | |
62 return static_cast<unsigned int>(it - src); | |
yurys
2015/03/30 20:33:16
unsigned int -> unsigned
loislo
2015/03/31 08:22:51
done
| |
61 } | 63 } |
62 | 64 |
63 | 65 |
64 static const char* reason(const i::Deoptimizer::DeoptReason reason) { | 66 static const char* reason(const i::Deoptimizer::DeoptReason reason) { |
65 return i::Deoptimizer::GetDeoptReason(reason); | 67 return i::Deoptimizer::GetDeoptReason(reason); |
66 } | 68 } |
67 | 69 |
68 | 70 |
69 TEST(StartStop) { | 71 TEST(StartStop) { |
70 i::Isolate* isolate = CcTest::i_isolate(); | 72 i::Isolate* isolate = CcTest::i_isolate(); |
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2024 iprofile->Print(); | 2026 iprofile->Print(); |
2025 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); | 2027 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); |
2026 | 2028 |
2027 const char* branch[] = {"", "test"}; | 2029 const char* branch[] = {"", "test"}; |
2028 const ProfileNode* itest_node = | 2030 const ProfileNode* itest_node = |
2029 GetSimpleBranch(profile, branch, arraysize(branch)); | 2031 GetSimpleBranch(profile, branch, arraysize(branch)); |
2030 CHECK_EQ(0, itest_node->deopt_infos().size()); | 2032 CHECK_EQ(0, itest_node->deopt_infos().size()); |
2031 | 2033 |
2032 iprofiler->DeleteProfile(iprofile); | 2034 iprofiler->DeleteProfile(iprofile); |
2033 } | 2035 } |
OLD | NEW |