afs: export internal stats for afs_CacheTruncateDaemon

In preparation for a future commit, redefine CTD_stats so they can be
reported externally.  While here, move and rename the struct.

While here, also remove an old comment concerning AIX.

No functional change is incurred by this commit.

Change-Id: If68e44f9dfae5a227d3a24f9fe34932ead1972d1
Reviewed-on: https://gerrit.openafs.org/14198
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Mark Vitale 2020-04-01 14:48:37 -04:00 committed by Benjamin Kaduk
parent e59307c14d
commit ee49a57bb4
2 changed files with 14 additions and 12 deletions

View File

@ -428,19 +428,10 @@ afs_MaybeWaitForCacheDrain(void)
}
}
/*!
* /struct CTD_stats
*
* Keep statistics on run time for afs_CacheTruncateDaemon. This is a
* struct so we need only export one symbol for AIX.
/*
* Keep statistics on run time for afs_CacheTruncateDaemon.
*/
static struct CTD_stats {
osi_timeval32_t CTD_beforeSleep;
osi_timeval32_t CTD_afterSleep;
osi_timeval32_t CTD_sleepTime;
osi_timeval32_t CTD_runTime;
int CTD_nSleeps;
} CTD_stats;
struct afs_CTD_stats CTD_stats;
u_int afs_min_cache = 0;

View File

@ -1170,6 +1170,17 @@ struct afs_stats_CMFullPerf {
struct afs_stats_AuthorInfo author; /*Authorship stats */
};
/*
* Statistics on run time for afs_CacheTruncateDaemon.
*/
struct afs_CTD_stats {
osi_timeval32_t CTD_beforeSleep;
osi_timeval32_t CTD_afterSleep;
osi_timeval32_t CTD_sleepTime;
osi_timeval32_t CTD_runTime;
int CTD_nSleeps;
};
#ifndef AFS_NOSTATS
/*
* We define routines to keep running counts and means. For the