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

Side by Side Diff: src/d8.cc

Issue 2410523002: [Tracing] Remove State Sampling Profiling (Closed)
Patch Set: CL for v8 perf tryjob to run speedometer benchmark on linux platform(s) Created 4 years, 2 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 | « include/libplatform/v8-tracing.h ('k') | src/tracing/trace-event.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 namespace tracing { 189 namespace tracing {
190 190
191 namespace { 191 namespace {
192 192
193 // String options that can be used to initialize TraceOptions. 193 // String options that can be used to initialize TraceOptions.
194 const char kRecordUntilFull[] = "record-until-full"; 194 const char kRecordUntilFull[] = "record-until-full";
195 const char kRecordContinuously[] = "record-continuously"; 195 const char kRecordContinuously[] = "record-continuously";
196 const char kRecordAsMuchAsPossible[] = "record-as-much-as-possible"; 196 const char kRecordAsMuchAsPossible[] = "record-as-much-as-possible";
197 197
198 const char kRecordModeParam[] = "record_mode"; 198 const char kRecordModeParam[] = "record_mode";
199 const char kEnableSamplingParam[] = "enable_sampling";
200 const char kEnableSystraceParam[] = "enable_systrace"; 199 const char kEnableSystraceParam[] = "enable_systrace";
201 const char kEnableArgumentFilterParam[] = "enable_argument_filter"; 200 const char kEnableArgumentFilterParam[] = "enable_argument_filter";
202 const char kIncludedCategoriesParam[] = "included_categories"; 201 const char kIncludedCategoriesParam[] = "included_categories";
203 const char kExcludedCategoriesParam[] = "excluded_categories"; 202 const char kExcludedCategoriesParam[] = "excluded_categories";
204 203
205 class TraceConfigParser { 204 class TraceConfigParser {
206 public: 205 public:
207 static void FillTraceConfig(v8::Isolate* isolate, 206 static void FillTraceConfig(v8::Isolate* isolate,
208 platform::tracing::TraceConfig* trace_config, 207 platform::tracing::TraceConfig* trace_config,
209 const char* json_str) { 208 const char* json_str) {
210 HandleScope outer_scope(isolate); 209 HandleScope outer_scope(isolate);
211 Local<Context> context = Context::New(isolate); 210 Local<Context> context = Context::New(isolate);
212 Context::Scope context_scope(context); 211 Context::Scope context_scope(context);
213 HandleScope inner_scope(isolate); 212 HandleScope inner_scope(isolate);
214 213
215 Local<String> source = 214 Local<String> source =
216 String::NewFromUtf8(isolate, json_str, NewStringType::kNormal) 215 String::NewFromUtf8(isolate, json_str, NewStringType::kNormal)
217 .ToLocalChecked(); 216 .ToLocalChecked();
218 Local<Value> result = JSON::Parse(context, source).ToLocalChecked(); 217 Local<Value> result = JSON::Parse(context, source).ToLocalChecked();
219 Local<v8::Object> trace_config_object = Local<v8::Object>::Cast(result); 218 Local<v8::Object> trace_config_object = Local<v8::Object>::Cast(result);
220 219
221 trace_config->SetTraceRecordMode( 220 trace_config->SetTraceRecordMode(
222 GetTraceRecordMode(isolate, context, trace_config_object)); 221 GetTraceRecordMode(isolate, context, trace_config_object));
223 if (GetBoolean(isolate, context, trace_config_object, 222 if (GetBoolean(isolate, context, trace_config_object,
224 kEnableSamplingParam)) {
225 trace_config->EnableSampling();
226 }
227 if (GetBoolean(isolate, context, trace_config_object,
228 kEnableSystraceParam)) { 223 kEnableSystraceParam)) {
229 trace_config->EnableSystrace(); 224 trace_config->EnableSystrace();
230 } 225 }
231 if (GetBoolean(isolate, context, trace_config_object, 226 if (GetBoolean(isolate, context, trace_config_object,
232 kEnableArgumentFilterParam)) { 227 kEnableArgumentFilterParam)) {
233 trace_config->EnableArgumentFilter(); 228 trace_config->EnableArgumentFilter();
234 } 229 }
235 UpdateCategoriesList(isolate, context, trace_config_object, 230 UpdateCategoriesList(isolate, context, trace_config_object,
236 kIncludedCategoriesParam, trace_config); 231 kIncludedCategoriesParam, trace_config);
237 UpdateCategoriesList(isolate, context, trace_config_object, 232 UpdateCategoriesList(isolate, context, trace_config_object,
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 } 2808 }
2814 2809
2815 } // namespace v8 2810 } // namespace v8
2816 2811
2817 2812
2818 #ifndef GOOGLE3 2813 #ifndef GOOGLE3
2819 int main(int argc, char* argv[]) { 2814 int main(int argc, char* argv[]) {
2820 return v8::Shell::Main(argc, argv); 2815 return v8::Shell::Main(argc, argv);
2821 } 2816 }
2822 #endif 2817 #endif
OLDNEW
« no previous file with comments | « include/libplatform/v8-tracing.h ('k') | src/tracing/trace-event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698