Dynamic Load Balance 3.6.1+32-59d1
talp.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2024 Barcelona Supercomputing Center */
3/* */
4/* This file is part of the DLB library. */
5/* */
6/* DLB is free software: you can redistribute it and/or modify */
7/* it under the terms of the GNU Lesser General Public License as published by */
8/* the Free Software Foundation, either version 3 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* DLB is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU Lesser General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18/*********************************************************************************/
19
20#ifndef DLB_CORE_TALP_H
21#define DLB_CORE_TALP_H
22
23#include "apis/dlb_talp.h"
24#include "support/atomic.h"
25#include "talp/talp_types.h"
26
27#include <pthread.h>
28#include <sched.h>
29#include <stdbool.h>
30#include <stdint.h>
31
32enum { TALP_NO_TIMESTAMP = 0 };
33
34typedef struct SubProcessDescriptor subprocess_descriptor_t;
35
36
37/* TALP init / finalize */
40
41
42/* TALP samples */
46 talp_sample_t *sample, talp_sample_state_t new_state);
48 talp_sample_t *sample, int64_t timestamp);
51 talp_sample_t **samples, unsigned int nelems);
52void talp_set_main_sample_in_serial_mode(bool serial_mode);
53
54
55/* TALP collect functions for 3rd party programs */
56int talp_query_pop_node_metrics(const char *name, struct dlb_node_metrics_t *node_metrics);
57
58
59/* TALP collect functions for 1st party programs */
61 struct dlb_monitor_t *monitor, struct dlb_pop_metrics_t *pop_metrics);
63 struct dlb_monitor_t *monitor, struct dlb_node_metrics_t *node_metrics);
64
65
66#endif
Definition: dlb_talp.h:35
Definition: dlb_talp.h:182
Definition: dlb_talp.h:91
Definition: spd.h:33
Definition: talp_types.h:50
void talp_update_sample(const subprocess_descriptor_t *spd, talp_sample_t *sample, int64_t timestamp)
Definition: talp.c:406
void talp_flush_sample_subset_to_regions(const subprocess_descriptor_t *spd, talp_sample_t **samples, unsigned int nelems)
Definition: talp.c:541
void talp_init(subprocess_descriptor_t *spd)
Definition: talp.c:135
void talp_set_main_sample_in_serial_mode(bool serial_mode)
Definition: talp.c:583
talp_sample_t * talp_get_thread_sample(const subprocess_descriptor_t *spd)
Definition: talp.c:326
int talp_query_pop_node_metrics(const char *name, struct dlb_node_metrics_t *node_metrics)
Definition: talp.c:600
int talp_collect_pop_metrics(const subprocess_descriptor_t *spd, struct dlb_monitor_t *monitor, struct dlb_pop_metrics_t *pop_metrics)
Definition: talp.c:686
int talp_flush_samples_to_regions(const subprocess_descriptor_t *spd)
Definition: talp.c:501
int talp_collect_pop_node_metrics(const subprocess_descriptor_t *spd, struct dlb_monitor_t *monitor, struct dlb_node_metrics_t *node_metrics)
Definition: talp.c:717
void talp_finalize(subprocess_descriptor_t *spd)
Definition: talp.c:217
@ TALP_NO_TIMESTAMP
Definition: talp.h:32
void talp_set_sample_state(const subprocess_descriptor_t *spd, talp_sample_t *sample, talp_sample_state_t new_state)
Definition: talp.c:383
talp_sample_state_t
Definition: talp_types.h:31