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

Unified Diff: components/metrics/call_stack_profile_params.h

Issue 2927593002: Make stack sampling profiler sample beyond startup. (Closed)
Patch Set: Remove debug log statements. Created 3 years, 5 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
Index: components/metrics/call_stack_profile_params.h
diff --git a/components/metrics/call_stack_profile_params.h b/components/metrics/call_stack_profile_params.h
index 4dd7cd4fef2fecf6cb1dc02f423adc4722f092ec..fad211616dc3838ef1e93e0ac9c5437c2d500574 100644
--- a/components/metrics/call_stack_profile_params.h
+++ b/components/metrics/call_stack_profile_params.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_METRICS_CALL_STACK_PROFILE_PARAMS_H_
#define COMPONENTS_METRICS_CALL_STACK_PROFILE_PARAMS_H_
+#include "base/time/time.h"
+
namespace metrics {
// Parameters to pass back to the metrics provider.
@@ -49,7 +51,8 @@ struct CallStackProfileParams {
PROCESS_STARTUP,
JANKY_TASK,
THREAD_HUNG,
- TRIGGER_LAST = THREAD_HUNG
+ PERIODIC_COLLECTION,
+ TRIGGER_LAST = PERIODIC_COLLECTION
};
// Allows the caller to specify whether sample ordering is
@@ -64,10 +67,20 @@ struct CallStackProfileParams {
// The default constructor is required for mojo and should not be used
// otherwise. A valid trigger should always be specified.
- CallStackProfileParams();
- CallStackProfileParams(Process process, Thread thread, Trigger trigger);
- CallStackProfileParams(Process process, Thread thread, Trigger trigger,
- SampleOrderingSpec ordering_spec);
+ constexpr CallStackProfileParams()
+ : CallStackProfileParams(UNKNOWN_PROCESS, UNKNOWN_THREAD, UNKNOWN) {}
+ constexpr CallStackProfileParams(Process process,
+ Thread thread,
+ Trigger trigger)
+ : CallStackProfileParams(process, thread, trigger, MAY_SHUFFLE) {}
+ constexpr CallStackProfileParams(Process process,
+ Thread thread,
+ Trigger trigger,
+ SampleOrderingSpec ordering_spec)
+ : process(process),
+ thread(thread),
+ trigger(trigger),
+ ordering_spec(ordering_spec) {}
// The collection process.
Process process;
@@ -80,6 +93,12 @@ struct CallStackProfileParams {
// Whether to preserve sample ordering.
SampleOrderingSpec ordering_spec;
+
+ // The time at which the CallStackProfileMetricsProvider became aware of the
+ // request for profiling. In particular, this is when callback was requested
+ // via CallStackProfileMetricsProvider::GetProfilerCallback(). Used to
+ // determine if collection was disabled during the collection of the profile.
+ base::TimeTicks start_timestamp;
};
} // namespace metrics
« no previous file with comments | « components/metrics/call_stack_profile_metrics_provider_unittest.cc ('k') | components/metrics/call_stack_profile_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698