| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 static Sampler* active_sampler_ = NULL; | 535 static Sampler* active_sampler_ = NULL; |
| 536 | 536 |
| 537 static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { | 537 static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { |
| 538 USE(info); | 538 USE(info); |
| 539 if (signal != SIGPROF) return; | 539 if (signal != SIGPROF) return; |
| 540 if (active_sampler_ == NULL) return; | 540 if (active_sampler_ == NULL) return; |
| 541 | 541 |
| 542 TickSample sample; | 542 TickSample sample; |
| 543 | 543 |
| 544 // We always sample the VM state. | 544 // We always sample the VM state. |
| 545 sample.state = Logger::state(); | 545 sample.state = VMState::current_state(); |
| 546 | 546 |
| 547 active_sampler_->Tick(&sample); | 547 active_sampler_->Tick(&sample); |
| 548 } | 548 } |
| 549 | 549 |
| 550 | 550 |
| 551 class Sampler::PlatformData : public Malloced { | 551 class Sampler::PlatformData : public Malloced { |
| 552 public: | 552 public: |
| 553 PlatformData() { | 553 PlatformData() { |
| 554 signal_handler_installed_ = false; | 554 signal_handler_installed_ = false; |
| 555 } | 555 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 } | 607 } |
| 608 | 608 |
| 609 // This sampler is no longer the active sampler. | 609 // This sampler is no longer the active sampler. |
| 610 active_sampler_ = NULL; | 610 active_sampler_ = NULL; |
| 611 active_ = false; | 611 active_ = false; |
| 612 } | 612 } |
| 613 | 613 |
| 614 #endif // ENABLE_LOGGING_AND_PROFILING | 614 #endif // ENABLE_LOGGING_AND_PROFILING |
| 615 | 615 |
| 616 } } // namespace v8::internal | 616 } } // namespace v8::internal |
| OLD | NEW |