mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
dmstats: add 'precise' flag field to stats report
Add a flag indicating whether or not precise_timestamps are enabled for a given region or area.
This commit is contained in:
parent
e4145ebc47
commit
463f59eca4
@ -1,5 +1,6 @@
|
||||
Version 1.02.106 -
|
||||
===================================
|
||||
Add 'precise' column to statistics reports.
|
||||
Add --precise switch to 'dmstats create' to request nanosecond counters.
|
||||
Add precise argument to dm_stats_create_region().
|
||||
Add support to libdm-stats for precise_timestamps
|
||||
|
@ -3425,6 +3425,17 @@ static int _dm_stats_aux_data_disp(struct dm_report *rh,
|
||||
return dm_report_field_string(rh, field, (const char * const *) &aux_data);
|
||||
}
|
||||
|
||||
static int _dm_stats_precise_disp(struct dm_report *rh,
|
||||
struct dm_pool *mem __attribute__((unused)),
|
||||
struct dm_report_field *field, const void *data,
|
||||
void *private __attribute__((unused)))
|
||||
{
|
||||
const struct dm_stats *dms = (const struct dm_stats *) data;
|
||||
int precise;
|
||||
precise = dm_stats_get_current_region_precise_timestamps(dms);
|
||||
return dm_report_field_int(rh, field, (const int *) &precise);
|
||||
}
|
||||
|
||||
static int _dm_stats_rrqm_disp(struct dm_report *rh,
|
||||
struct dm_pool *mem __attribute__((unused)),
|
||||
struct dm_report_field *field, const void *data,
|
||||
@ -4021,6 +4032,7 @@ FIELD_F(STATS_META, SIZ, "AOff", 5, dm_stats_area_offset, "area_offset", "Area o
|
||||
FIELD_F(STATS_META, NUM, "#Areas", 3, dm_stats_area_count, "area_count", "Area count.")
|
||||
FIELD_F(STATS_META, STR, "ProgID", 6, dm_stats_program_id, "program_id", "Program ID.")
|
||||
FIELD_F(STATS_META, STR, "AuxDat", 6, dm_stats_aux_data, "aux_data", "Auxiliary data.")
|
||||
FIELD_F(STATS_META, STR, "Precise", 5, dm_stats_precise, "precise", "Set if the nanosecond precision timers are enabled.")
|
||||
{0, 0, 0, 0, "", "", NULL, NULL},
|
||||
/* *INDENT-ON* */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user