From owner-svn-src-head@freebsd.org Mon Sep 14 16:18:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A106B3DB922; Mon, 14 Sep 2020 16:18:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bqs4G3qlxz3fZG; Mon, 14 Sep 2020 16:18:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CD7F194E6; Mon, 14 Sep 2020 16:18:54 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08EGIsDi048978; Mon, 14 Sep 2020 16:18:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08EGIrlj048975; Mon, 14 Sep 2020 16:18:53 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202009141618.08EGIrlj048975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 14 Sep 2020 16:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365727 - in head/usr.bin: . gprof X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/usr.bin: . gprof X-SVN-Commit-Revision: 365727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2020 16:18:54 -0000 Author: andrew Date: Mon Sep 14 16:18:53 2020 New Revision: 365727 URL: https://svnweb.freebsd.org/changeset/base/365727 Log: Cleanups for gprof: * Remove identical or almost identical headers * Only build aout.c on amd64 and i386. None of the the other current architectures ever supported running a.out binaries * Enable on all architectures Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26369 Deleted: head/usr.bin/gprof/amd64.h head/usr.bin/gprof/arm.h head/usr.bin/gprof/i386.h head/usr.bin/gprof/mips.h head/usr.bin/gprof/powerpc.h head/usr.bin/gprof/riscv.h head/usr.bin/gprof/sparc64.h Modified: head/usr.bin/Makefile head/usr.bin/gprof/Makefile head/usr.bin/gprof/gprof.h Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Sep 14 16:12:28 2020 (r365726) +++ head/usr.bin/Makefile Mon Sep 14 16:18:53 2020 (r365727) @@ -262,11 +262,7 @@ SUBDIR.${MK_TOOLCHAIN}+= ctags SUBDIR.${MK_TOOLCHAIN}+= cxxfilt SUBDIR.${MK_TOOLCHAIN}+= objcopy SUBDIR.${MK_TOOLCHAIN}+= file2c -# ARM64TODO gprof does not build -# RISCVTODO gprof does not build -.if ${MACHINE_ARCH} != "aarch64" SUBDIR.${MK_TOOLCHAIN}+= gprof -.endif SUBDIR.${MK_TOOLCHAIN}+= indent SUBDIR.${MK_TOOLCHAIN}+= lex SUBDIR.${MK_TOOLCHAIN}+= mkstr Modified: head/usr.bin/gprof/Makefile ============================================================================== --- head/usr.bin/gprof/Makefile Mon Sep 14 16:12:28 2020 (r365726) +++ head/usr.bin/gprof/Makefile Mon Sep 14 16:18:53 2020 (r365727) @@ -5,8 +5,7 @@ PROG= gprof SRCS= gprof.c arcs.c dfn.c elf.c lookup.c hertz.c \ printgprof.c printlist.c kernel.c -.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_CPUARCH} != "riscv" && \ - ${MACHINE_ARCH} != "s390x" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= aout.c CFLAGS+= -DWITH_AOUT .endif Modified: head/usr.bin/gprof/gprof.h ============================================================================== --- head/usr.bin/gprof/gprof.h Mon Sep 14 16:12:28 2020 (r365726) +++ head/usr.bin/gprof/gprof.h Mon Sep 14 16:18:53 2020 (r365727) @@ -39,27 +39,14 @@ #include #include -#if __amd64__ -# include "amd64.h" -#endif -#if __arm__ -# include "arm.h" -#endif -#if __i386__ -# include "i386.h" -#endif -#if __mips__ -# include "mips.h" -#endif -#if __powerpc__ -# include "powerpc.h" -#endif -#if __sparc64__ -# include "sparc64.h" -#endif -#if __riscv -# include "riscv.h" -#endif + /* + * offset (in bytes) of the code from the entry address of a routine. + * (see asgnsamples for use and explanation.) + */ +#define OFFSET_OF_CODE 0 + +enum opermodes { dummy }; +typedef enum opermodes operandenum; /* * booleans