profile: redo eventname handling

The eventname handling code was splattered all over the place.
Collect it in a single source file and use C++ idioms to avoid
nasty memory management. Provide a C-only interface, however.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2023-02-12 15:51:39 +01:00 committed by Dirk Hohndel
parent ab7b9329c0
commit 0d3c9954f4
10 changed files with 94 additions and 70 deletions

21
core/eventname.h Normal file
View file

@ -0,0 +1,21 @@
// collect all event names and whether we display events of that type
// SPDX-License-Identifier: GPL-2.0
#ifndef EVENTNAME_H
#define EVENTNAME_H
#ifdef __cplusplus
extern "C" {
#endif
extern void clear_event_names(void);
extern void remember_event_name(const char *eventname);
extern bool is_event_hidden(const char *eventname);
extern void hide_event(const char *eventname);
extern void show_all_events();
extern bool any_events_hidden();
#ifdef __cplusplus
}
#endif
#endif