Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES PerfLog dumper thread should be persistent #324

Closed
skliper opened this issue Sep 30, 2019 · 2 comments · Fixed by #595
Closed

ES PerfLog dumper thread should be persistent #324

skliper opened this issue Sep 30, 2019 · 2 comments · Fixed by #595
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 30, 2019

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.

@skliper skliper self-assigned this Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Imported from trac issue 293. Created by tflemin1 on 2019-05-16T16:12:04, last modified: 2019-05-23T16:43:54

@skliper
Copy link
Contributor Author

skliper commented May 12, 2020

Related to #456, Implemented in #595, committed to master from #586

@skliper skliper closed this as completed May 12, 2020
@skliper skliper added this to the 6.8.0 milestone May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants