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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2040683002: Remove dependencies of V8 on cpu-profiler is_profiling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use macro for declaring is_profiling Created 4 years, 6 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
« no previous file with comments | « src/compiler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include "src/isolate-inl.h" 7 #include "src/isolate-inl.h"
8 8
9 #include "src/base/platform/elapsed-timer.h" 9 #include "src/base/platform/elapsed-timer.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2943 compiler::SourcePosition pos(position); 2943 compiler::SourcePosition pos(position);
2944 if (source_position_table_) 2944 if (source_position_table_)
2945 source_position_table_->SetSourcePosition(node, pos); 2945 source_position_table_->SetSourcePosition(node, pos);
2946 } 2946 }
2947 2947
2948 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 2948 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
2949 CompilationInfo* info, 2949 CompilationInfo* info,
2950 const char* message, uint32_t index, 2950 const char* message, uint32_t index,
2951 wasm::WasmName func_name) { 2951 wasm::WasmName func_name) {
2952 Isolate* isolate = info->isolate(); 2952 Isolate* isolate = info->isolate();
2953 if (isolate->logger()->is_logging_code_events() || 2953 if (isolate->logger()->is_logging_code_events() || isolate->is_profiling()) {
2954 isolate->cpu_profiler()->is_profiling()) {
2955 ScopedVector<char> buffer(128); 2954 ScopedVector<char> buffer(128);
2956 SNPrintF(buffer, "%s#%d:%.*s", message, index, func_name.length(), 2955 SNPrintF(buffer, "%s#%d:%.*s", message, index, func_name.length(),
2957 func_name.start()); 2956 func_name.start());
2958 Handle<String> name_str = 2957 Handle<String> name_str =
2959 isolate->factory()->NewStringFromAsciiChecked(buffer.start()); 2958 isolate->factory()->NewStringFromAsciiChecked(buffer.start());
2960 Handle<String> script_str = 2959 Handle<String> script_str =
2961 isolate->factory()->NewStringFromAsciiChecked("(WASM)"); 2960 isolate->factory()->NewStringFromAsciiChecked("(WASM)");
2962 Handle<Code> code = info->code(); 2961 Handle<Code> code = info->code();
2963 Handle<SharedFunctionInfo> shared = 2962 Handle<SharedFunctionInfo> shared =
2964 isolate->factory()->NewSharedFunctionInfo(name_str, code, false); 2963 isolate->factory()->NewSharedFunctionInfo(name_str, code, false);
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
3298 function_->code_start_offset), 3297 function_->code_start_offset),
3299 compile_ms); 3298 compile_ms);
3300 } 3299 }
3301 3300
3302 return code; 3301 return code;
3303 } 3302 }
3304 3303
3305 } // namespace compiler 3304 } // namespace compiler
3306 } // namespace internal 3305 } // namespace internal
3307 } // namespace v8 3306 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698