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

Side by Side Diff: src/d8.cc

Issue 6598063: Use correct type for the map-counters flag used in d8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/flag-definitions.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 void Shell::AddHistogramSample(void* histogram, int sample) { 399 void Shell::AddHistogramSample(void* histogram, int sample) {
400 Counter* counter = reinterpret_cast<Counter*>(histogram); 400 Counter* counter = reinterpret_cast<Counter*>(histogram);
401 counter->AddSample(sample); 401 counter->AddSample(sample);
402 } 402 }
403 403
404 404
405 void Shell::Initialize() { 405 void Shell::Initialize() {
406 Shell::counter_map_ = new CounterMap(); 406 Shell::counter_map_ = new CounterMap();
407 // Set up counters 407 // Set up counters
408 if (i::FLAG_map_counters != NULL) 408 if (i::StrLength(i::FLAG_map_counters) != 0)
409 MapCounters(i::FLAG_map_counters); 409 MapCounters(i::FLAG_map_counters);
410 if (i::FLAG_dump_counters) { 410 if (i::FLAG_dump_counters) {
411 V8::SetCounterFunction(LookupCounter); 411 V8::SetCounterFunction(LookupCounter);
412 V8::SetCreateHistogramFunction(CreateHistogram); 412 V8::SetCreateHistogramFunction(CreateHistogram);
413 V8::SetAddHistogramSampleFunction(AddHistogramSample); 413 V8::SetAddHistogramSampleFunction(AddHistogramSample);
414 } 414 }
415 415
416 // Initialize the global objects 416 // Initialize the global objects
417 HandleScope scope; 417 HandleScope scope;
418 Handle<ObjectTemplate> global_template = ObjectTemplate::New(); 418 Handle<ObjectTemplate> global_template = ObjectTemplate::New();
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 return 0; 777 return 0;
778 } 778 }
779 779
780 780
781 } // namespace v8 781 } // namespace v8
782 782
783 783
784 int main(int argc, char* argv[]) { 784 int main(int argc, char* argv[]) {
785 return v8::Shell::Main(argc, argv); 785 return v8::Shell::Main(argc, argv);
786 } 786 }
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698