From owner-p4-projects@FreeBSD.ORG Wed Aug 23 21:37:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E0F3516A4E1; Wed, 23 Aug 2006 21:37:13 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3AFD16A4DF for ; Wed, 23 Aug 2006 21:37:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5021C43D4C for ; Wed, 23 Aug 2006 21:37:13 +0000 (GMT) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7NLbDl5020048 for ; Wed, 23 Aug 2006 21:37:13 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7NLbDRh020045 for perforce@freebsd.org; Wed, 23 Aug 2006 21:37:13 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 23 Aug 2006 21:37:13 GMT Message-Id: <200608232137.k7NLbDRh020045@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 104860 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2006 21:37:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=104860 Change 104860 by gonzo@gonzo_hideout on 2006/08/23 21:36:41 o Throw away amd64 profiling code. o Replace profiling codes with stubs. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/profile.h#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/profile.h#2 (text+ko) ==== @@ -57,19 +57,7 @@ #define MCOUNT_DECL(s) #define MCOUNT_ENTER(s) #define MCOUNT_EXIT(s) -#ifdef __GNUCLIKE_ASM -#define MCOUNT_OVERHEAD(label) \ - __asm __volatile("pushq %0; call __mcount; popq %%rcx" \ - : \ - : "i" (profil) \ - : "ax", "dx", "cx", "di", "si", "r8", "r9", "memory") -#define MEXITCOUNT_OVERHEAD() \ - __asm __volatile("call .mexitcount; 1:" \ - : : \ - : "ax", "dx", "cx", "di", "si", "r8", "r9", "memory") -#define MEXITCOUNT_OVERHEAD_GETLABEL(labelp) \ - __asm __volatile("movq $1b,%0" : "=rm" (labelp)) -#elif defined(lint) +#if defined(lint) #define MCOUNT_OVERHEAD(label) #define MEXITCOUNT_OVERHEAD() #define MEXITCOUNT_OVERHEAD_GETLABEL() @@ -112,71 +100,11 @@ static void _mcount(uintfptr_t frompc, uintfptr_t selfpc) __used; \ static void _mcount -#ifdef __GNUCLIKE_ASM -#define MCOUNT __asm(" \n\ - .globl .mcount \n\ - .type .mcount @function \n\ -.mcount: \n\ - pushq %rbp \n\ - movq %rsp,%rbp \n\ - pushq %rdi \n\ - pushq %rsi \n\ - pushq %rdx \n\ - pushq %rcx \n\ - pushq %r8 \n\ - pushq %r9 \n\ - pushq %rax \n\ - movq 8(%rbp),%rsi \n\ - movq (%rbp),%rdi \n\ - movq 8(%rdi),%rdi \n\ - call _mcount \n\ - popq %rax \n\ - popq %r9 \n\ - popq %r8 \n\ - popq %rcx \n\ - popq %rdx \n\ - popq %rsi \n\ - popq %rdi \n\ - leave \n\ - ret \n\ - .size .mcount, . - .mcount"); -#if 0 -/* - * We could use this, except it doesn't preserve the registers that were - * being passed with arguments to the function that we were inserted - * into. I've left it here as documentation of what the code above is - * supposed to do. - */ #define MCOUNT \ void \ mcount() \ { \ - uintfptr_t selfpc, frompc; \ - /* \ - * Find the return address for mcount, \ - * and the return address for mcount's caller. \ - * \ - * selfpc = pc pushed by call to mcount \ - */ \ - __asm("movq 8(%%rbp),%0" : "=r" (selfpc)); \ - /* \ - * frompc = pc pushed by call to mcount's caller. \ - * The caller's stack frame has already been built, so %rbp is \ - * the caller's frame pointer. The caller's raddr is in the \ - * caller's frame following the caller's caller's frame pointer.\ - */ \ - __asm("movq (%%rbp),%0" : "=r" (frompc)); \ - frompc = ((uintfptr_t *)frompc)[1]; \ - _mcount(frompc, selfpc); \ } -#endif -#else /* !__GNUCLIKE_ASM */ -#define MCOUNT \ -void \ -mcount() \ -{ \ -} -#endif /* __GNUCLIKE_ASM */ typedef u_long uintfptr_t;