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

Side by Side Diff: src/platform-openbsd.cc

Issue 1519027: Make VM state tracking to be independent of logging and profiling. (Closed)
Patch Set: Created 10 years, 8 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/platform-macos.cc ('k') | src/platform-solaris.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 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
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
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
OLDNEW
« no previous file with comments | « src/platform-macos.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698