diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2007-04-27 12:09:31 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2007-04-27 12:09:31 +0000 |
commit | 0dfc7735639067a12a4ccc63487f67169c17b9e1 (patch) | |
tree | ca768572366b64e2143b663b4f43d722aa1665d2 /usr.sbin/pmcstat/pmcstat.h | |
parent | d4fd0c015ba0676684469ae2c5461c424aa260fb (diff) | |
download | FreeBSD-src-0dfc7735639067a12a4ccc63487f67169c17b9e1.zip FreeBSD-src-0dfc7735639067a12a4ccc63487f67169c17b9e1.tar.gz |
MFP4: Enhancements to pmcstat(8):
- Allow the "-t" option to take a regular expression naming command
line processes to attach process PMCs to.
- Update the manual page and add an example showing the use of the
new functionality.
- Update the (c) year on the affected source files.
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat.h')
-rw-r--r-- | usr.sbin/pmcstat/pmcstat.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.h b/usr.sbin/pmcstat/pmcstat.h index 4a6ff4a..5b062a9 100644 --- a/usr.sbin/pmcstat/pmcstat.h +++ b/usr.sbin/pmcstat/pmcstat.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005-2006, Joseph Koshy + * Copyright (c) 2005-2007, Joseph Koshy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ #ifndef _PMCSTAT_H_ #define _PMCSTAT_H_ -#define FLAG_HAS_PID 0x00000001 /* explicit pid */ +#define FLAG_HAS_TARGET 0x00000001 /* process target */ #define FLAG_HAS_WAIT_INTERVAL 0x00000002 /* -w secs */ #define FLAG_HAS_OUTPUT_LOGFILE 0x00000004 /* -O file or pipe */ #define FLAG_HAS_COMMANDLINE 0x00000008 /* command */ @@ -94,11 +94,15 @@ struct pmcstat_ev { char *ev_spec; /* event specification */ }; +struct pmcstat_target { + SLIST_ENTRY(pmcstat_target) pt_next; + pid_t pt_pid; +}; + struct pmcstat_args { int pa_flags; /* argument flags */ int pa_required; /* required features */ int pa_verbosity; /* verbosity level */ - pid_t pa_pid; /* attached to pid */ FILE *pa_printfile; /* where to send printed output */ int pa_logfd; /* output log file */ char *pa_inputpath; /* path to input log */ @@ -111,7 +115,8 @@ struct pmcstat_args { double pa_interval; /* printing interval in seconds */ int pa_argc; char **pa_argv; - STAILQ_HEAD(, pmcstat_ev) pa_head; + STAILQ_HEAD(, pmcstat_ev) pa_events; + SLIST_HEAD(, pmcstat_target) pa_targets; } args; /* Function prototypes */ @@ -121,7 +126,9 @@ void pmcstat_clone_event_descriptor(struct pmcstat_args *_a, struct pmcstat_ev *_ev, uint32_t _cpumask); int pmcstat_close_log(struct pmcstat_args *_a); void pmcstat_create_process(struct pmcstat_args *_a); +void pmcstat_find_targets(struct pmcstat_args *_a, const char *_arg); void pmcstat_initialize_logging(struct pmcstat_args *_a); +void pmcstat_kill_process(struct pmcstat_args *_a); int pmcstat_open_log(const char *_p, int _mode); void pmcstat_print_counters(struct pmcstat_args *_a); void pmcstat_print_headers(struct pmcstat_args *_a); |