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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 const v8::CpuProfileNode* root = profile->GetTopDownRoot(); | 1361 const v8::CpuProfileNode* root = profile->GetTopDownRoot(); |
1362 ScopedVector<v8::Handle<v8::String> > names(3); | 1362 ScopedVector<v8::Handle<v8::String> > names(3); |
1363 names[0] = v8::String::New(ProfileGenerator::kGarbageCollectorEntryName); | 1363 names[0] = v8::String::New(ProfileGenerator::kGarbageCollectorEntryName); |
1364 names[1] = v8::String::New(ProfileGenerator::kProgramEntryName); | 1364 names[1] = v8::String::New(ProfileGenerator::kProgramEntryName); |
1365 names[2] = v8::String::New(ProfileGenerator::kIdleEntryName); | 1365 names[2] = v8::String::New(ProfileGenerator::kIdleEntryName); |
1366 CheckChildrenNames(root, names); | 1366 CheckChildrenNames(root, names); |
1367 | 1367 |
1368 const v8::CpuProfileNode* programNode = | 1368 const v8::CpuProfileNode* programNode = |
1369 GetChild(root, ProfileGenerator::kProgramEntryName); | 1369 GetChild(root, ProfileGenerator::kProgramEntryName); |
1370 CHECK_EQ(0, programNode->GetChildrenCount()); | 1370 CHECK_EQ(0, programNode->GetChildrenCount()); |
1371 CHECK_GE(programNode->GetSelfSamplesCount(), 3); | |
1372 CHECK_GE(programNode->GetHitCount(), 3); | 1371 CHECK_GE(programNode->GetHitCount(), 3); |
1373 | 1372 |
1374 const v8::CpuProfileNode* idleNode = | 1373 const v8::CpuProfileNode* idleNode = |
1375 GetChild(root, ProfileGenerator::kIdleEntryName); | 1374 GetChild(root, ProfileGenerator::kIdleEntryName); |
1376 CHECK_EQ(0, idleNode->GetChildrenCount()); | 1375 CHECK_EQ(0, idleNode->GetChildrenCount()); |
1377 CHECK_GE(idleNode->GetSelfSamplesCount(), 3); | |
1378 CHECK_GE(idleNode->GetHitCount(), 3); | 1376 CHECK_GE(idleNode->GetHitCount(), 3); |
1379 | 1377 |
1380 cpu_profiler->DeleteAllCpuProfiles(); | 1378 cpu_profiler->DeleteAllCpuProfiles(); |
1381 } | 1379 } |
OLD | NEW |