pmcstat_log.c (224698) | pmcstat_log.c (226514) |
---|---|
1/*- 2 * Copyright (c) 2005-2007, 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 * --- 20 unchanged lines hidden (view full) --- 29 */ 30 31/* 32 * Transform a hwpmc(4) log into human readable form, and into 33 * gprof(1) compatible profiles. 34 */ 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005-2007, 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 * --- 20 unchanged lines hidden (view full) --- 29 */ 30 31/* 32 * Transform a hwpmc(4) log into human readable form, and into 33 * gprof(1) compatible profiles. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/usr.sbin/pmcstat/pmcstat_log.c 224698 2011-08-07 18:37:05Z attilio $"); | 37__FBSDID("$FreeBSD: head/usr.sbin/pmcstat/pmcstat_log.c 226514 2011-10-18 15:25:43Z fabient $"); |
38 39#include <sys/param.h> 40#include <sys/endian.h> 41#include <sys/cpuset.h> 42#include <sys/gmon.h> 43#include <sys/imgact_aout.h> 44#include <sys/imgact_elf.h> 45#include <sys/mman.h> --- 1651 unchanged lines hidden (view full) --- 1697int 1698pmcstat_close_log(void) 1699{ 1700 /* If a local logfile is configured ask the kernel to stop 1701 * and flush data. Kernel will close the file when data is flushed 1702 * so keep the status to EXITING. 1703 */ 1704 if (args.pa_logfd != -1) { | 38 39#include <sys/param.h> 40#include <sys/endian.h> 41#include <sys/cpuset.h> 42#include <sys/gmon.h> 43#include <sys/imgact_aout.h> 44#include <sys/imgact_elf.h> 45#include <sys/mman.h> --- 1651 unchanged lines hidden (view full) --- 1697int 1698pmcstat_close_log(void) 1699{ 1700 /* If a local logfile is configured ask the kernel to stop 1701 * and flush data. Kernel will close the file when data is flushed 1702 * so keep the status to EXITING. 1703 */ 1704 if (args.pa_logfd != -1) { |
1705 if (pmc_flush_logfile() < 0) | 1705 if (pmc_close_logfile() < 0) |
1706 err(EX_OSERR, "ERROR: logging failed"); 1707 } 1708 1709 return (args.pa_flags & FLAG_HAS_PIPE ? PMCSTAT_EXITING : 1710 PMCSTAT_FINISHED); 1711} 1712 1713 --- 465 unchanged lines hidden --- | 1706 err(EX_OSERR, "ERROR: logging failed"); 1707 } 1708 1709 return (args.pa_flags & FLAG_HAS_PIPE ? PMCSTAT_EXITING : 1710 PMCSTAT_FINISHED); 1711} 1712 1713 --- 465 unchanged lines hidden --- |