pmcstat.c (226986) | pmcstat.c (227489) |
---|---|
1/*- 2 * Copyright (c) 2003-2008, Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003-2008, Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/usr.sbin/pmcstat/pmcstat.c 226986 2011-11-01 09:28:47Z fabient $"); | 32__FBSDID("$FreeBSD: head/usr.sbin/pmcstat/pmcstat.c 227489 2011-11-13 17:06:33Z eadler $"); |
33 34#include <sys/param.h> 35#include <sys/cpuset.h> 36#include <sys/event.h> 37#include <sys/queue.h> 38#include <sys/socket.h> 39#include <sys/stat.h> 40#include <sys/sysctl.h> --- 976 unchanged lines hidden (view full) --- 1017 if ((args.pa_flags & FLAG_HAS_COUNTING_PMCS) && 1018 (args.pa_flags & FLAG_HAS_SAMPLING_PMCS) && 1019 ((args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE) == 0)) 1020 errx(EX_USAGE, "ERROR: option -O is required if counting and " 1021 "sampling PMCs are specified together."); 1022 1023 /* 1024 * Check if "-k kerneldir" was specified, and if whether | 33 34#include <sys/param.h> 35#include <sys/cpuset.h> 36#include <sys/event.h> 37#include <sys/queue.h> 38#include <sys/socket.h> 39#include <sys/stat.h> 40#include <sys/sysctl.h> --- 976 unchanged lines hidden (view full) --- 1017 if ((args.pa_flags & FLAG_HAS_COUNTING_PMCS) && 1018 (args.pa_flags & FLAG_HAS_SAMPLING_PMCS) && 1019 ((args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE) == 0)) 1020 errx(EX_USAGE, "ERROR: option -O is required if counting and " 1021 "sampling PMCs are specified together."); 1022 1023 /* 1024 * Check if "-k kerneldir" was specified, and if whether |
1025 * 'kerneldir' actually refers to a a file. If so, use | 1025 * 'kerneldir' actually refers to a file. If so, use |
1026 * `dirname path` to determine the kernel directory. 1027 */ 1028 if (args.pa_flags & FLAG_HAS_KERNELPATH) { 1029 (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, 1030 args.pa_kernel); 1031 if (stat(buffer, &sb) < 0) 1032 err(EX_OSERR, "ERROR: Cannot locate kernel \"%s\"", 1033 buffer); --- 419 unchanged lines hidden --- | 1026 * `dirname path` to determine the kernel directory. 1027 */ 1028 if (args.pa_flags & FLAG_HAS_KERNELPATH) { 1029 (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, 1030 args.pa_kernel); 1031 if (stat(buffer, &sb) < 0) 1032 err(EX_OSERR, "ERROR: Cannot locate kernel \"%s\"", 1033 buffer); --- 419 unchanged lines hidden --- |