Skip to content

ES PerfLog dumper thread should be persistent #324

@skliper

Description

@skliper

CFE_ES_PerfLogStop spawns a child task to run CFE_ES_PerfLogDump. There should be a persistent thread to handle dumping the data, created during initialization.

This will require some changes to CFE_ES_PerfLogDump which is currently written to run only once.


Background:

I sent the following to the CFS community mailing list:

CFE_ES_PerfLogStop spawns a new thread via CFE_ES_CreateChildTask to
dump the performance data to disk. This occurs whenever ES receives a
command to stop recording performance data.

It's my understanding that spawning threads at runtime, as opposed to
during initialization, is discouraged in real-time code due to
overhead like allocating memory. See, e.g.
https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/memory
which states "all RT threads need to be created at startup time,
before the RT show time."

Should a persistent "dumper" thread be spawned during ES
initialization rather than when the stop command is received?

I then received an off-list reply from Dave McComas:

I noticed the same thing when I looked at the code after your other email and I agree. Do you mind writing a ticket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions