Preemptively fix profiler-related valgrind errors/straight out bugs.
I forgot to initialize some fields in requests.
This commit is contained in:
parent
3b61b76876
commit
e0d33ef8d7
|
@ -2671,6 +2671,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
|
|||
for (const auto& pair : interfaces) {
|
||||
ProfilerRequest profileRequest;
|
||||
profileRequest.type = ProfilerRequest::Type::FLOW;
|
||||
profileRequest.action = ProfilerRequest::Action::RUN;
|
||||
profileRequest.duration = duration;
|
||||
profileRequest.outputFile = tokens[4];
|
||||
all_profiler_addresses.push_back(pair.first);
|
||||
|
@ -2688,6 +2689,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
|
|||
for (int tokenidx = 5; tokenidx < tokens.size(); tokenidx++) {
|
||||
ProfilerRequest profileRequest;
|
||||
profileRequest.type = ProfilerRequest::Type::FLOW;
|
||||
profileRequest.action = ProfilerRequest::Action::RUN;
|
||||
profileRequest.duration = duration;
|
||||
profileRequest.outputFile = tokens[4];
|
||||
all_profiler_addresses.push_back(tokens[tokenidx]);
|
||||
|
|
|
@ -77,7 +77,9 @@ struct CpuProfilerWorkload : TestWorkload
|
|||
for(i = 0; i < self->profilingWorkers.size(); i++)
|
||||
{
|
||||
ProfilerRequest req;
|
||||
req.type = ProfilerRequest::Type::FLOW;
|
||||
req.action = enabled ? ProfilerRequest::Action::ENABLE : ProfilerRequest::Action::DISABLE;
|
||||
req.duration = 0; //unused
|
||||
|
||||
//The profiler output name will be the ip.port.prof
|
||||
req.outputFile = StringRef(toIPString(self->profilingWorkers[i].address().ip) + "." + format("%d", self->profilingWorkers[i].address().port) + ".prof");
|
||||
|
@ -98,7 +100,9 @@ struct CpuProfilerWorkload : TestWorkload
|
|||
|
||||
//Enable (or disable) the profiler on the current tester
|
||||
ProfilerRequest req;
|
||||
req.type = ProfilerRequest::Type::FLOW;
|
||||
req.action = enabled ? ProfilerRequest::Action::ENABLE : ProfilerRequest::Action::DISABLE;
|
||||
req.duration = 0; //unused
|
||||
req.outputFile = StringRef(toIPString(g_network->getLocalAddress().ip) + "." + format("%d", g_network->getLocalAddress().port) + ".prof");
|
||||
|
||||
updateCpuProfiler(req);
|
||||
|
|
Loading…
Reference in New Issue