Commit ae1c3f5a authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Format

parent 8145ecbb
...@@ -1006,7 +1006,7 @@ int main(int argc, char *argv[]) { ...@@ -1006,7 +1006,7 @@ int main(int argc, char *argv[]) {
/* Initialise the particles */ /* Initialise the particles */
engine_init_particles(&e, flag_entropy_ICs, clean_smoothing_length_values); engine_init_particles(&e, flag_entropy_ICs, clean_smoothing_length_values);
/* Write the state of the system before starting time integration. */ /* Write the state of the system before starting time integration. */
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
logger_ensure_size(e.log, e.total_nr_parts, e.total_nr_gparts, 0); logger_ensure_size(e.log, e.total_nr_parts, e.total_nr_gparts, 0);
logger_log_all(e.log, &e); logger_log_all(e.log, &e);
......
...@@ -279,9 +279,6 @@ struct cell { ...@@ -279,9 +279,6 @@ struct cell {
/*! Values of h_max before the drifts, used for sub-cell tasks. */ /*! Values of h_max before the drifts, used for sub-cell tasks. */
float h_max_old; float h_max_old;
/*! The logger task */
struct task *logger;
/*! The task to compute time-steps */ /*! The task to compute time-steps */
struct task *timestep; struct task *timestep;
...@@ -556,6 +553,9 @@ struct cell { ...@@ -556,6 +553,9 @@ struct cell {
/*! Task for source terms */ /*! Task for source terms */
struct task *sourceterms; struct task *sourceterms;
/*! The logger task */
struct task *logger;
/*! Minimum dimension, i.e. smallest edge of this cell (min(width)). */ /*! Minimum dimension, i.e. smallest edge of this cell (min(width)). */
float dmin; float dmin;
......
...@@ -49,14 +49,12 @@ ...@@ -49,14 +49,12 @@
void *dump_get(struct dump *d, size_t count, size_t *offset) { void *dump_get(struct dump *d, size_t count, size_t *offset) {
size_t local_offset = atomic_add(&d->count, count); size_t local_offset = atomic_add(&d->count, count);
#ifdef SWIFT_DEBUG_CHECKS #ifdef SWIFT_DEBUG_CHECKS
if (d->count > d->size) if (d->count > d->size) error("A new dump file should have been created.");
error("A new dump file should have been created.");
#endif #endif
*offset = local_offset + d->file_offset; *offset = local_offset + d->file_offset;
return (char *)d->data + local_offset; return (char *)d->data + local_offset;
} }
/** /**
* @brief Ensure that at least size bytes are available in the #dump. * @brief Ensure that at least size bytes are available in the #dump.
*/ */
...@@ -86,7 +84,7 @@ void dump_ensure(struct dump *d, size_t size) { ...@@ -86,7 +84,7 @@ void dump_ensure(struct dump *d, size_t size) {
if ((d->data = mmap(NULL, d->size, PROT_WRITE, MAP_SHARED, d->fd, if ((d->data = mmap(NULL, d->size, PROT_WRITE, MAP_SHARED, d->fd,
d->file_offset)) == MAP_FAILED) { d->file_offset)) == MAP_FAILED) {
error("Failed to allocate map of size %zi bytes (%s).", d->size, error("Failed to allocate map of size %zi bytes (%s).", d->size,
strerror(errno)); strerror(errno));
} }
} }
......
...@@ -115,8 +115,7 @@ const char *engine_policy_names[] = {"none", ...@@ -115,8 +115,7 @@ const char *engine_policy_names[] = {"none",
"structure finding", "structure finding",
"star formation", "star formation",
"feedback", "feedback",
"logger" "logger"};
};
/** The rank of the engine as a global variable (for messages). */ /** The rank of the engine as a global variable (for messages). */
int engine_rank; int engine_rank;
...@@ -233,10 +232,9 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -233,10 +232,9 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
c, NULL); c, NULL);
#if defined(WITH_LOGGER) #if defined(WITH_LOGGER)
c->logger = scheduler_addtask(s, task_type_logger, task_subtype_none, 0, 0, c->logger = scheduler_addtask(s, task_type_logger, task_subtype_none, 0,
c, NULL); 0, c, NULL);
#endif #endif
c->kick2 = scheduler_addtask(s, task_type_kick2, task_subtype_none, 0, 0, c->kick2 = scheduler_addtask(s, task_type_kick2, task_subtype_none, 0, 0,
c, NULL); c, NULL);
...@@ -277,7 +275,7 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) { ...@@ -277,7 +275,7 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
#if defined(WITH_LOGGER) #if defined(WITH_LOGGER)
scheduler_addunlock(s, c->kick1, c->logger); scheduler_addunlock(s, c->kick1, c->logger);
#endif #endif
} }
} else { /* We are above the super-cell so need to go deeper */ } else { /* We are above the super-cell so need to go deeper */
...@@ -4260,7 +4258,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements, ...@@ -4260,7 +4258,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* logger tasks ? */ /* logger tasks ? */
else if (t->type == task_type_logger) { else if (t->type == task_type_logger) {
if (cell_is_active_hydro(t->ci, e) || cell_is_active_gravity(t->ci, e)) if (cell_is_active_hydro(t->ci, e) || cell_is_active_gravity(t->ci, e))
scheduler_activate(s, t); scheduler_activate(s, t);
} }
/* Gravity stuff ? */ /* Gravity stuff ? */
...@@ -5215,10 +5213,9 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs, ...@@ -5215,10 +5213,9 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs,
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
logger_log_timestamp(e->log, e->ti_current, &e->log->timestamp_offset); logger_log_timestamp(e->log, e->ti_current, &e->log->timestamp_offset);
logger_ensure_size(e->log, e->total_nr_parts, e->total_nr_gparts, logger_ensure_size(e->log, e->total_nr_parts, e->total_nr_gparts, 0);
0);
#endif #endif
/* Now, launch the calculation */ /* Now, launch the calculation */
TIMER_TIC; TIMER_TIC;
engine_launch(e); engine_launch(e);
...@@ -5470,8 +5467,7 @@ void engine_step(struct engine *e) { ...@@ -5470,8 +5467,7 @@ void engine_step(struct engine *e) {
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
logger_log_timestamp(e->log, e->ti_current, &e->log->timestamp_offset); logger_log_timestamp(e->log, e->ti_current, &e->log->timestamp_offset);
logger_ensure_size(e->log, e->total_nr_parts, e->total_nr_gparts, logger_ensure_size(e->log, e->total_nr_parts, e->total_nr_gparts, 0);
0);
#endif #endif
/* Are we drifting everything (a la Gadget/GIZMO) ? */ /* Are we drifting everything (a la Gadget/GIZMO) ? */
...@@ -5625,9 +5621,9 @@ void engine_check_for_dumps(struct engine *e) { ...@@ -5625,9 +5621,9 @@ void engine_check_for_dumps(struct engine *e) {
/* Dump everything */ /* Dump everything */
engine_print_stats(e); engine_print_stats(e);
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
engine_dump_index(e); engine_dump_index(e);
#else #else
engine_dump_snapshot(e); engine_dump_snapshot(e);
#endif #endif
} else if (e->ti_next_stats < e->ti_next_snapshot) { } else if (e->ti_next_stats < e->ti_next_snapshot) {
...@@ -5659,9 +5655,9 @@ void engine_check_for_dumps(struct engine *e) { ...@@ -5659,9 +5655,9 @@ void engine_check_for_dumps(struct engine *e) {
/* Dump snapshot */ /* Dump snapshot */
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
engine_dump_index(e); engine_dump_index(e);
#else #else
engine_dump_snapshot(e); engine_dump_snapshot(e);
#endif #endif
} else if (e->ti_next_stats > e->ti_next_snapshot) { } else if (e->ti_next_stats > e->ti_next_snapshot) {
...@@ -5681,9 +5677,9 @@ void engine_check_for_dumps(struct engine *e) { ...@@ -5681,9 +5677,9 @@ void engine_check_for_dumps(struct engine *e) {
/* Dump snapshot */ /* Dump snapshot */
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
engine_dump_index(e); engine_dump_index(e);
#else #else
engine_dump_snapshot(e); engine_dump_snapshot(e);
#endif #endif
/* Let's fake that we are at the stats dump time */ /* Let's fake that we are at the stats dump time */
...@@ -6484,8 +6480,8 @@ void engine_dump_snapshot(struct engine *e) { ...@@ -6484,8 +6480,8 @@ void engine_dump_snapshot(struct engine *e) {
MPI_INFO_NULL); MPI_INFO_NULL);
#endif #endif
#else #else
write_output_single(e, e->snapshot_base_name, e->internal_units, write_output_single(e, e->snapshot_base_name, e->internal_units,
e->snapshot_units); e->snapshot_units);
#endif #endif
#endif #endif
...@@ -6524,7 +6520,7 @@ void engine_dump_index(struct engine *e) { ...@@ -6524,7 +6520,7 @@ void engine_dump_index(struct engine *e) {
/* Dump... */ /* Dump... */
write_index_single(e, e->log->base_name, e->internal_units, write_index_single(e, e->log->base_name, e->internal_units,
e->snapshot_units); e->snapshot_units);
e->dump_snapshot = 0; e->dump_snapshot = 0;
...@@ -6702,9 +6698,8 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params, ...@@ -6702,9 +6698,8 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
e->last_repartition = 0; e->last_repartition = 0;
#endif #endif
#if defined(WITH_LOGGER) #if defined(WITH_LOGGER)
e->log = (struct logger *) malloc(sizeof(struct logger)); e->log = (struct logger *)malloc(sizeof(struct logger));
logger_init(e->log, params); logger_init(e->log, params);
#endif #endif
...@@ -7166,8 +7161,9 @@ void engine_config(int restart, struct engine *e, struct swift_params *params, ...@@ -7166,8 +7161,9 @@ void engine_config(int restart, struct engine *e, struct swift_params *params,
#if defined(WITH_LOGGER) #if defined(WITH_LOGGER)
if (e->nodeID == 0) if (e->nodeID == 0)
message("WARNING: There is currently no way of predicting the output " message(
"size, please use it carefully"); "WARNING: There is currently no way of predicting the output "
"size, please use it carefully");
#endif #endif
/* Find the time of the first snapshot output */ /* Find the time of the first snapshot output */
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "kernel_gravity.h" #include "kernel_gravity.h"
#include "minmax.h" #include "minmax.h"
/** /**
* @brief Returns the mass of a particle * @brief Returns the mass of a particle
* *
...@@ -147,7 +146,6 @@ __attribute__((always_inline)) INLINE static void gravity_init_gpart( ...@@ -147,7 +146,6 @@ __attribute__((always_inline)) INLINE static void gravity_init_gpart(
gp->a_grav[0] = 0.f; gp->a_grav[0] = 0.f;
gp->a_grav[1] = 0.f; gp->a_grav[1] = 0.f;
gp->a_grav[2] = 0.f; gp->a_grav[2] = 0.f;
gp->last_output = SHRT_MAX;
#ifdef SWIFT_GRAVITY_FORCE_CHECKS #ifdef SWIFT_GRAVITY_FORCE_CHECKS
gp->potential_PM = 0.f; gp->potential_PM = 0.f;
......
...@@ -788,7 +788,7 @@ hydro_set_init_internal_energy(struct part *p, float u_init) { ...@@ -788,7 +788,7 @@ hydro_set_init_internal_energy(struct part *p, float u_init) {
__attribute__((always_inline)) INLINE static int xpart_should_write( __attribute__((always_inline)) INLINE static int xpart_should_write(
const struct xpart *xp, const struct engine *e) { const struct xpart *xp, const struct engine *e) {
return (xp->logger_data.last_output > e->log->delta_step); return (xp->logger_data.last_output > e->log->delta_step);
} }
#endif #endif
......
...@@ -188,19 +188,17 @@ INLINE static void hydro_write_particles(const struct part* parts, ...@@ -188,19 +188,17 @@ INLINE static void hydro_write_particles(const struct part* parts,
#endif #endif
} }
/** /**
* @brief Specifies which particle fields to write to a dataset * @brief Specifies which particle fields to write to a dataset
* *
* @param parts The particle array. * @param parts The particle array.
* @param list The list of i/o properties to write. * @param list The list of i/o properties to write.
* @param num_fields The number of i/o fields to write. * @param num_fields The number of i/o fields to write.
* *
* In this version, we only want the ids and the offset. * In this version, we only want the ids and the offset.
*/ */
__attribute__((always_inline)) INLINE static void hydro_write_index( __attribute__((always_inline)) INLINE static void hydro_write_index(
const struct part* parts, const struct xpart* xparts, const struct part* parts, const struct xpart* xparts, struct io_props* list,
struct io_props* list,
int* num_fields) { int* num_fields) {
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
...@@ -210,15 +208,13 @@ __attribute__((always_inline)) INLINE static void hydro_write_index( ...@@ -210,15 +208,13 @@ __attribute__((always_inline)) INLINE static void hydro_write_index(
list[0] = io_make_output_field("ParticleIDs", ULONGLONG, 1, list[0] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, parts, id); UNIT_CONV_NO_UNITS, parts, id);
list[1] = io_make_output_field("Offset", ULONGLONG, 1, list[1] = io_make_output_field("Offset", ULONGLONG, 1, UNIT_CONV_NO_UNITS,
UNIT_CONV_NO_UNITS, xparts, logger_data.last_offset); xparts, logger_data.last_offset);
#else #else
error("Cannot write index without logger"); error("Cannot write index without logger");
#endif #endif
} }
/** /**
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grpsph The HDF5 group in which to write
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
#ifdef WITH_LOGGER #ifdef WITH_LOGGER
/* Some standard headers. */ /* Some standard headers. */
#include <hdf5.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <hdf5.h>
/* This object's header. */ /* This object's header. */
#include "logger.h" #include "logger.h"
...@@ -35,21 +35,16 @@ ...@@ -35,21 +35,16 @@
/* Local headers. */ /* Local headers. */
#include "atomic.h" #include "atomic.h"
#include "dump.h" #include "dump.h"
#include "engine.h"
#include "error.h" #include "error.h"
#include "part.h" #include "part.h"
#include "units.h" #include "units.h"
#include "engine.h"
char logger_version[logger_version_size] = "0.1"; char logger_version[logger_version_size] = "0.1";
const unsigned int logger_datatype_size[logger_data_count] = { const unsigned int logger_datatype_size[logger_data_count] = {
sizeof(int), sizeof(int), sizeof(float), sizeof(double),
sizeof(float), sizeof(char), sizeof(long long), 1,
sizeof(double),
sizeof(char),
sizeof(long long),
1,
}; };
/** /**
...@@ -62,7 +57,8 @@ const unsigned int logger_datatype_size[logger_data_count] = { ...@@ -62,7 +57,8 @@ const unsigned int logger_datatype_size[logger_data_count] = {
* *
* @return updated buff * @return updated buff
*/ */
char *logger_write_chunk_header(char *buff, const unsigned int *mask, const size_t *offset, const size_t offset_new) { char *logger_write_chunk_header(char *buff, const unsigned int *mask,
const size_t *offset, const size_t offset_new) {
/* write mask */ /* write mask */
memcpy(buff, mask, logger_mask_size); memcpy(buff, mask, logger_mask_size);
buff += logger_mask_size; buff += logger_mask_size;
...@@ -83,8 +79,8 @@ char *logger_write_chunk_header(char *buff, const unsigned int *mask, const size ...@@ -83,8 +79,8 @@ char *logger_write_chunk_header(char *buff, const unsigned int *mask, const size
* @param size number of bytes to write * @param size number of bytes to write
* @param p pointer to the data * @param p pointer to the data
*/ */
void logger_write_data(struct dump *d, size_t *offset, size_t size, const void * p) void logger_write_data(struct dump *d, size_t *offset, size_t size,
{ const void *p) {
/* get buffer */ /* get buffer */
char *buff = dump_get(d, size, offset); char *buff = dump_get(d, size, offset);
...@@ -105,9 +101,10 @@ void logger_write_data(struct dump *d, size_t *offset, size_t size, const void * ...@@ -105,9 +101,10 @@ void logger_write_data(struct dump *d, size_t *offset, size_t size, const void *
* @param name Label of the parameter (should be smaller than log->name) * @param name Label of the parameter (should be smaller than log->name)
* @param data_type #logger_datatype to write * @param data_type #logger_datatype to write
*/ */
void logger_write_general_data(struct dump *d, const struct logger_parameters *params, size_t *offset, void logger_write_general_data(struct dump *d,
const void *p, char* name, size_t data_type) const struct logger_parameters *params,
{ size_t *offset, const void *p, char *name,
size_t data_type) {
/* write name */ /* write name */
logger_write_data(d, offset, params->label_size, name); logger_write_data(d, offset, params->label_size, name);
...@@ -115,8 +112,7 @@ void logger_write_general_data(struct dump *d, const struct logger_parameters *p ...@@ -115,8 +112,7 @@ void logger_write_general_data(struct dump *d, const struct logger_parameters *p
logger_write_data(d, offset, params->data_type_size, &data_type); logger_write_data(d, offset, params->data_type_size, &data_type);
/* write value */ /* write value */
if (data_type >= logger_data_count) if (data_type >= logger_data_count) error("Not implemented");
error("Not implemented");
size_t size = logger_datatype_size[data_type]; size_t size = logger_datatype_size[data_type];
logger_write_data(d, offset, size, p); logger_write_data(d, offset, size, p);
...@@ -186,22 +182,21 @@ void logger_log_all(struct logger *log, const struct engine *e) { ...@@ -186,22 +182,21 @@ void logger_log_all(struct logger *log, const struct engine *e) {
/* some constants */ /* some constants */
const struct space *s = e->s; const struct space *s = e->s;
const unsigned int mask = logger_mask_x | logger_mask_v | logger_mask_a | const unsigned int mask = logger_mask_x | logger_mask_v | logger_mask_a |
logger_mask_u | logger_mask_h | logger_mask_rho | logger_mask_u | logger_mask_h | logger_mask_rho |
logger_mask_consts; logger_mask_consts;
/* loop over all parts */ /* loop over all parts */
for(long long i=0; i < e->total_nr_parts; i++) { for (long long i = 0; i < e->total_nr_parts; i++) {
logger_log_part(log, &s->parts[i], mask, &s->xparts[i].logger_data.last_offset); logger_log_part(log, &s->parts[i], mask,
&s->xparts[i].logger_data.last_offset);
s->xparts[i].logger_data.last_output = 0; s->xparts[i].logger_data.last_output = 0;
} }
/* loop over all gparts */ /* loop over all gparts */
if (e->total_nr_gparts > 0) if (e->total_nr_gparts > 0) error("Not implemented");
error("Not implemented");
/* loop over all sparts */ /* loop over all sparts */
// TODO // TODO
} }
/** /**
...@@ -210,9 +205,11 @@ void logger_log_all(struct logger *log, const struct engine *e) { ...@@ -210,9 +205,11 @@ void logger_log_all(struct logger *log, const struct engine *e) {
* @param log The #logger * @param log The #logger
* @param p The #part to dump. * @param p The #part to dump.
* @param mask The mask of the data to dump. * @param mask The mask of the data to dump.
* @param offset Pointer to the offset of the previous log of this particle; (return) offset of this log. * @param offset Pointer to the offset of the previous log of this particle;
* (return) offset of this log.
*/ */
void logger_log_part(struct logger *log, const struct part *p, unsigned int mask, size_t *offset) { void logger_log_part(struct logger *log, const struct part *p,
unsigned int mask, size_t *offset) {
/* Make sure we're not writing a timestamp. */ /* Make sure we're not writing a timestamp. */
if (mask & logger_mask_timestamp) if (mask & logger_mask_timestamp)
...@@ -286,9 +283,11 @@ void logger_log_part(struct logger *log, const struct part *p, unsigned int mask ...@@ -286,9 +283,11 @@ void logger_log_part(struct logger *log, const struct part *p, unsigned int mask
* @param log The #logger * @param log The #logger
* @param p The #gpart to dump. * @param p The #gpart to dump.
* @param mask The mask of the data to dump. * @param mask The mask of the data to dump.
* @param offset Pointer to the offset of the previous log of this particle; (return) offset of this log. * @param offset Pointer to the offset of the previous log of this particle;
* (return) offset of this log.
*/ */
void logger_log_gpart(struct logger *log, const struct gpart *p, unsigned int mask, size_t *offset) { void logger_log_gpart(struct logger *log, const struct gpart *p,
unsigned int mask, size_t *offset) {
/* Make sure we're not writing a timestamp. */ /* Make sure we're not writing a timestamp. */
if (mask & logger_mask_timestamp) if (mask & logger_mask_timestamp)
...@@ -343,11 +342,13 @@ void logger_log_gpart(struct logger *log, const struct gpart *p, unsigned int ma ...@@ -343,11 +342,13 @@ void logger_log_gpart(struct logger *log, const struct gpart *p, unsigned int ma
* *
* @param log The #logger * @param log The #logger
* @param timestamp time to write * @param timestamp time to write
* @param offset Pointer to the offset of the previous log of this particle; (return) offset of this log. * @param offset Pointer to the offset of the previous log of this particle;
* (return) offset of this log.
*/ */
void logger_log_timestamp(struct logger *log, integertime_t timestamp, size_t *offset) { void logger_log_timestamp(struct logger *log, integertime_t timestamp,
size_t *offset) {
struct dump *dump = log->dump; struct dump *dump = log->dump;
/* Start by computing the size of the message. */ /* Start by computing the size of the message. */
const int size = logger_compute_chunk_size(logger_mask_timestamp); const int size = logger_compute_chunk_size(logger_mask_timestamp);
...@@ -366,7 +367,6 @@ void logger_log_timestamp(struct logger *log, integertime_t timestamp, size_t *o ...@@ -366,7 +367,6 @@ void logger_log_timestamp(struct logger *log, integertime_t timestamp, size_t *o
*offset = offset_new; *offset = offset_new;
} }
/** /**
* @brief Ensure that the buffer is large enough for a step. * @brief Ensure that the buffer is large enough for a step.
* *
...@@ -378,16 +378,15 @@ void logger_log_timestamp(struct logger *log, integertime_t timestamp, size_t *o ...@@ -378,16 +378,15 @@ void logger_log_timestamp(struct logger *log, integertime_t timestamp, size_t *o
* @param total_nr_gparts total number of gpart * @param total_nr_gparts total number of gpart
* @param total_nr_sparts total number of spart * @param total_nr_sparts total number of spart
*/ */
void logger_ensure_size( void logger_ensure_size(struct logger *log, size_t total_nr_parts,
struct logger *log, size_t total_nr_parts, size_t total_nr_gparts, size_t total_nr_sparts) {
size_t total_nr_gparts, size_t total_nr_sparts) {
struct logger_parameters *log_params = log->params; struct logger_parameters *log_params = log->params;
/* count part memory */ /* count part memory */
size_t limit = log_params->offset_size + log_params->mask_size; size_t limit = log_params->offset_size + log_params->mask_size;
for(size_t i=0; i < log_params->nber_mask; i++) { for (size_t i = 0; i < log_params->nber_mask; i++) {
if (log_params->masks[i] != logger_mask_timestamp) if (log_params->masks[i] != logger_mask_timestamp)
limit += log_params->masks_data_size[i]; limit += log_params->masks_data_size[i];