#ifndef __TRACE_STAT_H#define __TRACE_STAT_H#include <linux/seq_file.h>/* * If you want to provide a stat file (one-shot statistics), fill * an iterator with stat_start/stat_next and a stat_show callbacks. * The others callbacks are optional. */structtracer_stat{/* The name of your stat file */constchar*name;/* Iteration over statistic entries */void*(*stat_start)(void);void*(*stat_next)(void*prev,intidx);/* Compare two entries for stats sorting */int(*stat_cmp)(void*p1,void*p2);/* Print a stat entry */int(*stat_show)(structseq_file*s,void*p);/* Print the headers of your stat entries */int(*stat_headers)(structseq_file*s);};/* * Destroy or create a stat file */externintregister_stat_tracer(structtracer_stat*trace);externvoidunregister_stat_tracer(structtracer_stat*trace);#endif /* __TRACE_STAT_H */