History log of /freebsd-current/usr.sbin/pmcannotate/pmcannotate.c
Revision Date Author Comments
# 4d65a7c6 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 73702c39 14-Jun-2022 John Baldwin <jhb@FreeBSD.org>

pmcannotate: Don't increment end address passed to objdump -d.

libpmc already returns an end address that is after the end of the
last instruction of a function (on both amd64 and arm64) as the end
address written to the annotate map file is computed as the start
address of the symbol plus the size.

Adding one could result in a curious failure where an entire
function's contents in assembly was reduced instead to only the first
instruction. The reason is that when the end instruction is bumped by
one, objdump -d can append the first instruction of the next function
in its output. However, since pmcannotate concatenates all of the
objdump -d output from various functions into a single file which it
then searches to find the assembly for a given file, if this
additional trailer was earlier in the file than the full function, the
trailer was chosen to represent the entire function resulting in the
truncated listing of the function.

Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D35399


# b4cc0838 18-May-2018 Andrew Gallatin <gallatin@FreeBSD.org>

Teach pmcannotate about $TMPDIR and _PATH_TMP

Convert pmcannotate to using $TMPDIR and _PATH_TMP rather than hard
coding /tmp for temporary files. Pmcannotate sometimes needs quite a
lot of space to store the output from objdump, and will fail in odd
ways if that output is truncated due to lack of space in /tmp.

Reviewed by: jtl
Sponsored by: Netflix


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 04abf5f1 15-May-2014 John-Mark Gurney <jmg@FreeBSD.org>

make a note that FNBUFF cannot overflow as long as LNBUFF is smaller..

MFC after: 2 weeks


# caaeeed4 15-May-2014 George V. Neville-Neil <gnn@FreeBSD.org>

Extend the size of the function or symbol that can be annotated.

MFC after: 2 weeks


# 28a83c9f 06-May-2013 Hiren Panchasara <hiren@FreeBSD.org>

objdump output changed indentation from 1 space to 2 spaces somewhere between
FreeBSD9 and CURRENT. Removing this rather unnecessary check which expects the
second character of assembly line to be a hex number to make pmcannotate
actually annotate the code and assembly.

PR: 165654
Submitted by: Vitaly Magerya <vmagerya@gmail.com>
Reviewed by: attilio
Approved by: sbruno (mentor)
MFC after: 3 weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 54ac64ab 16-Oct-2010 Benedict Reuschling <bcr@FreeBSD.org>

Fix a grammatical error connected to the previous commit.

Spotted by: gjb@


# c4fadc2b 16-Oct-2010 Benedict Reuschling <bcr@FreeBSD.org>

Correct some typos in comments, no functional changes.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 10bc3a7f 29-Dec-2009 Ed Schouten <ed@FreeBSD.org>

ANSIfy almost all applications that use WARNS=6.

I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.


# 1b4822a4 26-Nov-2008 Attilio Rao <attilio@FreeBSD.org>

Import an initial revision of the pmcannotate tool.
For further explanations please check this e-mail on freebsd-arch@:
http://lists.freebsd.org/pipermail/freebsd-arch/2008-November/008698.html

Tested by: gnn
Sponsored by: Nokia