* struct afs_CMCallStats
* This is the place where we keep records on each and every
* function call.
+ *
+ * This structure is encoded as a binary blob and thrown at the client
+ * for use by the xstat_cm interface. As the datastructure is unversioned,
+ * some rules apply;
+ * *) Never add elements to the middle of the list. Everything new
+ * must go at the end
+ * *) Never remove elements from the list. If a function dies, don't
+ * remove it's entry here (by all means, flag it as dead, though)
+ * *) Never make elements conditional on preprocessor symbols. Doing
+ * this would mean that the client has to be built with exactly
+ * the same options as you are. Which isn't a great idea.
+ *
*/
struct afs_CMCallStats {
afs_int32 C_afs_init; /* afs_aix_subr.c */
afs_int32 C_SRXAFSCB_GetCacheConfig; /* afs_callback.c */
afs_int32 C_SRXAFSCB_GetCE64; /* afs_callback.c */
afs_int32 C_SRXAFSCB_GetCellByNum; /* afs_callback.c */
-#if defined(AFS_CACHE_BYPASS)
afs_int32 C_BPrefetchNoCache; /* afs_daemons.c */
- afs_int32 C_afs_ReadNoCache; /* osi_vnodeops.c */
-#endif
+ afs_int32 C_afs_ReadNoCache; /* osi_vnodeops.c */
};
struct afs_CMMeanStats {
cmp = (struct afs_CMStats *)(xstat_cm_Results.data.AFSCB_CollData_val);
+ if (xstat_cm_Results.data.AFSCB_CollData_len != sizeof(struct afs_CMStats))
+ printf("Data sets differ in size. Is cache manager a different version?");
+
printf("\t%10d afs_init\n", cmp->callInfo.C_afs_init);
printf("\t%10d gop_rdwr\n", cmp->callInfo.C_gop_rdwr);
printf("\t%10d aix_gnode_rele\n", cmp->callInfo.C_aix_gnode_rele);
printf("\t%10d gettimeofday\n", cmp->callInfo.C_gettimeofday);
printf("\t%10d m_cpytoc\n", cmp->callInfo.C_m_cpytoc);
printf("\t%10d aix_vattr_null\n", cmp->callInfo.C_aix_vattr_null);
- printf("\t%10d afs_gn_frunc\n", cmp->callInfo.C_afs_gn_ftrunc);
+ printf("\t%10d afs_gn_ftrunc\n", cmp->callInfo.C_afs_gn_ftrunc);
printf("\t%10d afs_gn_rdwr\n", cmp->callInfo.C_afs_gn_rdwr);
printf("\t%10d afs_gn_ioctl\n", cmp->callInfo.C_afs_gn_ioctl);
printf("\t%10d afs_gn_locktl\n", cmp->callInfo.C_afs_gn_lockctl);
printf("\t%10d afs_hp_strategy\n", cmp->callInfo.C_afs_hp_strategy);
#endif
printf("\t%10d PFlushMount\n", cmp->callInfo.C_PFlushMount);
+ printf("\t%10d SRXAFSCB_GetServerPrefs\n",
+ cmp->callInfo.C_SRXAFSCB_GetServerPrefs);
+ printf("\t%10d SRXAFSCB_GetCellServDB\n",
+ cmp->callInfo.C_SRXAFSCB_GetCellServDB);
+ printf("\t%10d SRXAFSCB_GetLocalCell\n",
+ cmp->callInfo.C_SRXAFSCB_GetLocalCell);
+ printf("\t%10d afs_MarshallCacheConfig\n",
+ cmp->callInfo.C_afs_MarshallCacheConfig);
+ printf("\t%10d SRXAFSCB_GetCacheConfig\n",
+ cmp->callInfo.C_SRXAFSCB_GetCacheConfig);
+ printf("\t%10d SRXAFSCB_GetCE64\n", cmp->callInfo.C_SRXAFSCB_GetCE64);
+ printf("\t%10d SRXAFSCB_GetCellByNum\n",
+ cmp->callInfo.C_SRXAFSCB_GetCellByNum);
+ printf("\t%10d BPrefetchNoCache\n", cmp->callInfo.C_BPrefetchNoCache);
+ printf("\t%10d afs_ReadNoCache\n", cmp->callInfo.C_afs_ReadNoCache);
}