Deleted Added
full compact
pmcstat_log.c (147712) pmcstat_log.c (147863)
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

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

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
27#include <sys/cdefs.h>
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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/usr.sbin/pmcstat/pmcstat_log.c 147712 2005-07-01 03:45:01Z jkoshy $");
28__FBSDID("$FreeBSD: head/usr.sbin/pmcstat/pmcstat_log.c 147863 2005-07-09 17:08:46Z jkoshy $");
29
30/*
31 * Transform a hwpmc(4) log into human readable form and into gprof(1)
32 * compatible profiles.
33 */
34
35#include <sys/param.h>
36#include <sys/endian.h>

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

1154 (uintmax_t) ev.pl_count + 1, ev.pl_offset);
1155 /*NOTREACHED*/
1156}
1157
1158/*
1159 * Process a log file in offline analysis mode.
1160 */
1161
29
30/*
31 * Transform a hwpmc(4) log into human readable form and into gprof(1)
32 * compatible profiles.
33 */
34
35#include <sys/param.h>
36#include <sys/endian.h>

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

1154 (uintmax_t) ev.pl_count + 1, ev.pl_offset);
1155 /*NOTREACHED*/
1156}
1157
1158/*
1159 * Process a log file in offline analysis mode.
1160 */
1161
1162void
1162int
1163pmcstat_process_log(struct pmcstat_args *a)
1164{
1165
1166 /*
1167 * If gprof style profiles haven't been asked for, just print the
1168 * log to the current output file.
1169 */
1170 if (a->pa_flags & FLAG_DO_PRINT)
1163pmcstat_process_log(struct pmcstat_args *a)
1164{
1165
1166 /*
1167 * If gprof style profiles haven't been asked for, just print the
1168 * log to the current output file.
1169 */
1170 if (a->pa_flags & FLAG_DO_PRINT)
1171 pmcstat_print_log(a);
1171 return pmcstat_print_log(a);
1172 else
1173 /* convert the log to gprof compatible profiles */
1172 else
1173 /* convert the log to gprof compatible profiles */
1174 pmcstat_convert_log(a);
1175
1176 return;
1174 return pmcstat_convert_log(a);
1177}
1178
1179void
1180pmcstat_initialize_logging(struct pmcstat_args *a)
1181{
1182 int i, isdynamic;
1183 const char *kernpath;
1184 struct pmcstat_image *img;

--- 69 unchanged lines hidden ---
1175}
1176
1177void
1178pmcstat_initialize_logging(struct pmcstat_args *a)
1179{
1180 int i, isdynamic;
1181 const char *kernpath;
1182 struct pmcstat_image *img;

--- 69 unchanged lines hidden ---