summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-04-25 21:59:48 -0700
committerAndreas Gampe <agampe@google.com>2018-05-03 13:32:05 -0700
commit590c86a492311d5c0d0efd49aa40c6388f03c4f9 (patch)
treec15a9eb7a70e510e7320ef9b2084a9052040a515
parenteab74de5e0eb2190a9354da8cc4c7a3b35eab2a1 (diff)
downloadextras-590c86a492311d5c0d0efd49aa40c6388f03c4f9.tar.gz
Perfprofd: Use the right parameter
Fix a typo. (cherry picked from commit 51c08f9041648378717c79f787db773ac55e74b1) Bug: 73175642 Test: perfprofd_test Merged-In: I5d80887af08e3b3a1b19a1a303ca1c63bec75fbd Change-Id: I5d80887af08e3b3a1b19a1a303ca1c63bec75fbd
-rw-r--r--perfprofd/perfprofdcore.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/perfprofd/perfprofdcore.cc b/perfprofd/perfprofdcore.cc
index d7b0e9b4..065f8e67 100644
--- a/perfprofd/perfprofdcore.cc
+++ b/perfprofd/perfprofdcore.cc
@@ -456,7 +456,6 @@ PROFILE_RESULT encode_to_proto(const std::string &data_file_path,
//
static PROFILE_RESULT invoke_perf(Config& config,
const std::string &perf_path,
- unsigned sampling_period,
const char *stack_profile_opt,
unsigned duration,
const std::string &data_file_path,
@@ -495,11 +494,11 @@ static PROFILE_RESULT invoke_perf(Config& config,
std::string p_str;
if (config.sampling_frequency > 0) {
argv[slot++] = "-f";
- p_str = android::base::StringPrintf("%u", sampling_period);
+ p_str = android::base::StringPrintf("%u", config.sampling_frequency);
argv[slot++] = p_str.c_str();
} else if (config.sampling_period > 0) {
argv[slot++] = "-c";
- p_str = android::base::StringPrintf("%u", sampling_period);
+ p_str = android::base::StringPrintf("%u", config.sampling_period);
argv[slot++] = p_str.c_str();
}
@@ -657,11 +656,9 @@ static ProtoUniquePtr collect_profile(Config& config)
const char *stack_profile_opt =
(config.stack_profile ? "-g" : nullptr);
const std::string& perf_path = config.perf_path;
- uint32_t period = config.sampling_period;
PROFILE_RESULT ret = invoke_perf(config,
perf_path.c_str(),
- period,
stack_profile_opt,
duration,
data_file_path,