Deleted Added
sdiff udiff text old ( 147863 ) new ( 157144 )
full compact
1/*-
2 * Copyright (c) 2005, Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright

--- 7 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/pmcstat/pmcstat.h 147863 2005-07-09 17:08:46Z jkoshy $
27 */
28
29#ifndef _PMCSTAT_H_
30#define _PMCSTAT_H_
31
32#define FLAG_HAS_PID 0x00000001 /* explicit pid */
33#define FLAG_HAS_WAIT_INTERVAL 0x00000002 /* -w secs */
34#define FLAG_HAS_OUTPUT_LOGFILE 0x00000004 /* -O file or pipe */

--- 53 unchanged lines hidden (view full) ---

88 int ev_fieldskip; /* #leading spaces */
89 pmc_value_t ev_saved; /* saved value for incremental counts */
90 pmc_id_t ev_pmcid; /* allocated ID */
91};
92
93struct pmcstat_args {
94 int pa_flags; /* argument flags */
95 int pa_required; /* required features */
96 pid_t pa_pid; /* attached to pid */
97 FILE *pa_printfile; /* where to send printed output */
98 int pa_logfd; /* output log file */
99 char *pa_inputpath; /* path to input log */
100 char *pa_outputpath; /* path to output log */
101 void *pa_logparser; /* log file parser */
102 const char *pa_kernel; /* pathname of the kernel */
103 const char *pa_samplesdir; /* directory for profile files */
104 double pa_interval; /* printing interval in seconds */
105 int pa_argc;
106 char **pa_argv;
107 STAILQ_HEAD(, pmcstat_ev) pa_head;
108} args;
109
110/* Function prototypes */
111void pmcstat_cleanup(struct pmcstat_args *_a);
112int pmcstat_close_log(struct pmcstat_args *_a);
113void pmcstat_initialize_logging(struct pmcstat_args *_a);
114int pmcstat_open(const char *_p, int _mode);
115void pmcstat_print_counters(struct pmcstat_args *_a);
116void pmcstat_print_headers(struct pmcstat_args *_a);
117void pmcstat_print_pmcs(struct pmcstat_args *_a);
118void pmcstat_setup_process(struct pmcstat_args *_a);
119void pmcstat_show_usage(void);
120void pmcstat_shutdown_logging(void);
121void pmcstat_start_pmcs(struct pmcstat_args *_a);
122void pmcstat_start_process(struct pmcstat_args *_a);
123int pmcstat_process_log(struct pmcstat_args *_a);
124int pmcstat_print_log(struct pmcstat_args *_a);
125int pmcstat_convert_log(struct pmcstat_args *_a);
126
127#endif /* _PMCSTAT_H_ */