Skip to content

Commit

Permalink
Merge pull request #19197 from ghalliday/issue32798
Browse files Browse the repository at this point in the history
HPCC-32798 Prevent esp from coring at closedown with COLLECT_SERVICE_METRICS=ON

Reviewed-By: Ken Rowland <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Oct 17, 2024
2 parents 7bf4acc + a40e8c9 commit c807f0d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions tools/hidl/hidlcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4036,29 +4036,18 @@ void EspServInfo::write_esp_binding_ipp()

//
// Create scaled histogram metric member variables enabled methods
// Only output the ifdef if needed
bool needIfDef = true;
// Always output, even if they are never initialised to prevent problems
// where the header is included with inconsistent #defines
for (mthi = methods; mthi != NULL; mthi = mthi->next)
{
if (mthi->isExecutionProfilingEnabled())
{
if (needIfDef)
{
outf("#ifdef ESP_SERVICE_%s\n", name_);
needIfDef = false;
}
outs("\tstd::shared_ptr<hpccMetrics::ScaledHistogramMetric> ");
outs(mthi->getExecutionProfilingMetricVariableName());
outs(";\n");
}
}

// If false, then ifdef was output, close it
if (!needIfDef)
{
outf("#endif\n");
}

outs("};\n\n");
}

Expand Down

0 comments on commit c807f0d

Please sign in to comment.