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

Unified Diff: src/platform-linux.cc

Issue 660452: Assign to "sample.state" before reading it. (Closed)
Patch Set: Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index e890f94aad39190ad78bd2a99338404a7358a8db..7898aba982a513f037993994072029a01510584a 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -728,6 +728,9 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
TickSample sample;
+ // We always sample the VM state.
+ sample.state = Logger::state();
+
// If profiling, we extract the current pc and sp.
if (active_sampler_->IsProfiling()) {
// Extracting the sample from the context is extremely machine dependent.
@@ -760,9 +763,6 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
active_sampler_->SampleStack(&sample);
}
- // We always sample the VM state.
- sample.state = Logger::state();
-
active_sampler_->Tick(&sample);
#endif
}
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698