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

Side by Side Diff: test/cctest/test-cpu-profiler.cc

Issue 1970193002: [compiler] Avoid passing CompilationInfo to profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-sidechannel-2
Patch Set: Created 4 years, 7 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
OLDNEW
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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 ProfileGenerator generator(profiles); 1026 ProfileGenerator generator(profiles);
1027 SmartPointer<ProfilerEventsProcessor> processor(new ProfilerEventsProcessor( 1027 SmartPointer<ProfilerEventsProcessor> processor(new ProfilerEventsProcessor(
1028 &generator, NULL, v8::base::TimeDelta::FromMicroseconds(100))); 1028 &generator, NULL, v8::base::TimeDelta::FromMicroseconds(100)));
1029 processor->Start(); 1029 processor->Start();
1030 CpuProfiler profiler(isolate, profiles, &generator, processor.get()); 1030 CpuProfiler profiler(isolate, profiles, &generator, processor.get());
1031 1031
1032 // Enqueue code creation events. 1032 // Enqueue code creation events.
1033 i::Handle<i::String> str = factory->NewStringFromAsciiChecked(func_name); 1033 i::Handle<i::String> str = factory->NewStringFromAsciiChecked(func_name);
1034 int line = 1; 1034 int line = 1;
1035 int column = 1; 1035 int column = 1;
1036 profiler.CodeCreateEvent(i::Logger::FUNCTION_TAG, code, func->shared(), NULL, 1036 profiler.CodeCreateEvent(i::Logger::FUNCTION_TAG, code, func->shared(), *str,
1037 *str, line, column); 1037 line, column);
1038 1038
1039 // Enqueue a tick event to enable code events processing. 1039 // Enqueue a tick event to enable code events processing.
1040 EnqueueTickSampleEvent(processor.get(), code_address); 1040 EnqueueTickSampleEvent(processor.get(), code_address);
1041 1041
1042 processor->StopSynchronously(); 1042 processor->StopSynchronously();
1043 1043
1044 CpuProfile* profile = profiles->StopProfiling(""); 1044 CpuProfile* profile = profiles->StopProfiling("");
1045 CHECK(profile); 1045 CHECK(profile);
1046 1046
1047 // Check the state of profile generator. 1047 // Check the state of profile generator.
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2023 iprofile->Print(); 2023 iprofile->Print();
2024 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile); 2024 v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile);
2025 2025
2026 const char* branch[] = {"", "test"}; 2026 const char* branch[] = {"", "test"};
2027 const ProfileNode* itest_node = 2027 const ProfileNode* itest_node =
2028 GetSimpleBranch(env, profile, branch, arraysize(branch)); 2028 GetSimpleBranch(env, profile, branch, arraysize(branch));
2029 CHECK_EQ(0U, itest_node->deopt_infos().size()); 2029 CHECK_EQ(0U, itest_node->deopt_infos().size());
2030 2030
2031 iprofiler->DeleteProfile(iprofile); 2031 iprofiler->DeleteProfile(iprofile);
2032 } 2032 }
OLDNEW
« src/compiler/ast-graph-builder.h ('K') | « src/profiler/cpu-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698