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

Side by Side Diff: src/platform.h

Issue 11193020: Revert recent CPU profiler changes because they broke --prof. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/platform-cygwin.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 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 virtual ~Sampler(); 734 virtual ~Sampler();
735 735
736 int interval() const { return interval_; } 736 int interval() const { return interval_; }
737 737
738 // Performs stack sampling. 738 // Performs stack sampling.
739 void SampleStack(TickSample* sample) { 739 void SampleStack(TickSample* sample) {
740 DoSampleStack(sample); 740 DoSampleStack(sample);
741 IncSamplesTaken(); 741 IncSamplesTaken();
742 } 742 }
743 743
744 // Performs platform-specific stack sampling.
745 void DoSample();
746
747 // This method is called for each sampling period with the current 744 // This method is called for each sampling period with the current
748 // program counter. 745 // program counter.
749 virtual void Tick(TickSample* sample) = 0; 746 virtual void Tick(TickSample* sample) = 0;
750 747
751 // Start and stop sampler. 748 // Start and stop sampler.
752 void Start(); 749 void Start();
753 void Stop(); 750 void Stop();
754 751
755 // Is the sampler used for profiling? 752 // Is the sampler used for profiling?
756 bool IsProfiling() const { return NoBarrier_Load(&profiling_) > 0; } 753 bool IsProfiling() const { return NoBarrier_Load(&profiling_) > 0; }
(...skipping 27 matching lines...) Expand all
784 Atomic32 active_; 781 Atomic32 active_;
785 PlatformData* data_; // Platform specific data. 782 PlatformData* data_; // Platform specific data.
786 int samples_taken_; // Counts stack samples taken. 783 int samples_taken_; // Counts stack samples taken.
787 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 784 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
788 }; 785 };
789 786
790 787
791 } } // namespace v8::internal 788 } } // namespace v8::internal
792 789
793 #endif // V8_PLATFORM_H_ 790 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698