Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoftsm committed Jul 14, 2023
1 parent c16c0ca commit 94c98b9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 53 deletions.
6 changes: 1 addition & 5 deletions collectors/ebpf.plugin/ebpf_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,6 @@ static void ebpf_function_thread_manipulation(const char *transaction,
if (show_specific_thread && !(show_specific_thread & 1<<i))
continue;

ebpf_module_t *wem = &ebpf_modules[i];
if (show_specific_thread && !(show_specific_thread & 1<<i))
continue;

ebpf_module_t *wem = &ebpf_modules[i];
buffer_json_add_array_item_array(wb);

Expand Down Expand Up @@ -265,7 +261,7 @@ static void ebpf_function_thread_manipulation(const char *transaction,

// Either it is not running or received a disabled signal and it is stopping.
if (wem->enabled > NETDATA_THREAD_EBPF_FUNCTION_RUNNING ||
(!wem->life_time && (int)wem->running_time == wem->update_every)) {
(!wem->lifetime && (int)wem->running_time == wem->update_every)) {
// status
buffer_json_add_array_item_string(wb, EBPF_THREAD_STATUS_STOPPED);

Expand Down
18 changes: 1 addition & 17 deletions collectors/ebpf.plugin/ebpf_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,7 @@
#define EBPF_THREAD_STATUS_RUNNING "running"
#define EBPF_THREAD_STATUS_STOPPED "stopped"

// function list
#define EBPF_FUNCTION_THREAD "ebpf_thread"

#define EBPF_PLUGIN_THREAD_FUNCTION_DESCRIPTION "Detailed information on the currently running threads."
#define EBPF_PLUGIN_THREAD_FUNCTION_ERROR_THREAD_NOT_FOUND "ebpf.plugin does not have thread named "

#define EBPF_PLUGIN_FUNCTIONS(NAME, DESC) do { \
fprintf(stdout, PLUGINSD_KEYWORD_FUNCTION " \"" NAME "\" 10 \"%s\"\n", DESC); \
} while(0)

#define EBPF_THREADS_SELECT_THREAD "thread:"
#define EBPF_THREADS_ENABLE_CATEGORY "enable:"
#define EBPF_THREADS_DISABLE_CATEGORY "disable:"

#define EBPF_THREAD_STATUS_RUNNING "running"
#define EBPF_THREAD_STATUS_STOPPED "stopped"

void *ebpf_function_thread(void *ptr);

#endif

30 changes: 0 additions & 30 deletions collectors/ebpf.plugin/ebpf_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,36 +252,6 @@ static void ebpf_obsolete_mount_global(ebpf_module_t *em)
em->update_every);
}

/**
* Obsolete global
*
* Obsolete global charts created by thread.
*
* @param em a pointer to `struct ebpf_module`
*/
static void ebpf_obsolete_mount_global(ebpf_module_t *em)
{
ebpf_write_chart_obsolete(NETDATA_EBPF_MOUNT_GLOBAL_FAMILY,
NETDATA_EBPF_MOUNT_CALLS,
"Calls to mount and umount syscalls",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_MOUNT_FAMILY,
NETDATA_EBPF_CHART_TYPE_LINE,
NULL,
NETDATA_CHART_PRIO_EBPF_MOUNT_CHARTS,
em->update_every);

ebpf_write_chart_obsolete(NETDATA_EBPF_MOUNT_GLOBAL_FAMILY,
NETDATA_EBPF_MOUNT_ERRORS,
"Errors to mount and umount file systems",
EBPF_COMMON_DIMENSION_CALL,
NETDATA_EBPF_MOUNT_FAMILY,
NETDATA_EBPF_CHART_TYPE_LINE,
NULL,
NETDATA_CHART_PRIO_EBPF_MOUNT_CHARTS + 1,
em->update_every);
}

/**
* Mount Exit
*
Expand Down
1 change: 0 additions & 1 deletion collectors/ebpf.plugin/ebpf_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ static void ebpf_vfs_read_global_table(netdata_idx_t *stats, int maps_per_core)
maps_per_core,
NETDATA_CONTROLLER_PID_TABLE_ADD,
NETDATA_CONTROLLER_END);
uint64_t idx;

vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_UNLINK].ncall = res[NETDATA_KEY_CALLS_VFS_UNLINK];
vfs_publish_aggregated[NETDATA_KEY_PUBLISH_VFS_READ].ncall = res[NETDATA_KEY_CALLS_VFS_READ] +
Expand Down

0 comments on commit 94c98b9

Please sign in to comment.