OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 | 429 |
430 void CpuProfiler::StartProcessorIfNotStarted() { | 430 void CpuProfiler::StartProcessorIfNotStarted() { |
431 if (processor_ == NULL) { | 431 if (processor_ == NULL) { |
432 Logger* logger = isolate_->logger(); | 432 Logger* logger = isolate_->logger(); |
433 // Disable logging when using the new implementation. | 433 // Disable logging when using the new implementation. |
434 saved_is_logging_ = logger->is_logging_; | 434 saved_is_logging_ = logger->is_logging_; |
435 logger->is_logging_ = false; | 435 logger->is_logging_ = false; |
436 generator_ = new ProfileGenerator(profiles_); | 436 generator_ = new ProfileGenerator(profiles_); |
437 Sampler* sampler = logger->sampler(); | 437 Sampler* sampler = logger->sampler(); |
| 438 #if V8_CC_MSVC && (_MSC_VER >= 1800) |
| 439 // VS2013 reports "warning C4316: 'v8::internal::ProfilerEventsProcessor' |
| 440 // : object allocated on the heap may not be aligned 64". We need to |
| 441 // figure out if this is a legitimate warning or a compiler bug. |
| 442 #pragma warning(push) |
| 443 #pragma warning(disable:4316) |
| 444 #endif |
438 processor_ = new ProfilerEventsProcessor( | 445 processor_ = new ProfilerEventsProcessor( |
439 generator_, sampler, sampling_interval_); | 446 generator_, sampler, sampling_interval_); |
| 447 #if V8_CC_MSVC && (_MSC_VER >= 1800) |
| 448 #pragma warning(pop) |
| 449 #endif |
440 is_profiling_ = true; | 450 is_profiling_ = true; |
441 // Enumerate stuff we already have in the heap. | 451 // Enumerate stuff we already have in the heap. |
442 ASSERT(isolate_->heap()->HasBeenSetUp()); | 452 ASSERT(isolate_->heap()->HasBeenSetUp()); |
443 if (!FLAG_prof_browser_mode) { | 453 if (!FLAG_prof_browser_mode) { |
444 logger->LogCodeObjects(); | 454 logger->LogCodeObjects(); |
445 } | 455 } |
446 logger->LogCompiledFunctions(); | 456 logger->LogCompiledFunctions(); |
447 logger->LogAccessorCallbacks(); | 457 logger->LogAccessorCallbacks(); |
448 LogBuiltins(); | 458 LogBuiltins(); |
449 // Enable stack sampling. | 459 // Enable stack sampling. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 511 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
502 Builtins::Name id = static_cast<Builtins::Name>(i); | 512 Builtins::Name id = static_cast<Builtins::Name>(i); |
503 rec->start = builtins->builtin(id)->address(); | 513 rec->start = builtins->builtin(id)->address(); |
504 rec->builtin_id = id; | 514 rec->builtin_id = id; |
505 processor_->Enqueue(evt_rec); | 515 processor_->Enqueue(evt_rec); |
506 } | 516 } |
507 } | 517 } |
508 | 518 |
509 | 519 |
510 } } // namespace v8::internal | 520 } } // namespace v8::internal |
OLD | NEW |