From rutgers!apple!usc!cs.utexas.edu!uunet!ibmpa!bullhead!brunner Wed Jul 26 14:45:41 EDT 1989
Article 976 of comp.sys.ibm.pc.rt:
Path: cmcl2!rutgers!apple!usc!cs.utexas.edu!uunet!ibmpa!bullhead!brunner
>From: brunner@bullhead.uucp
Newsgroups: comp.sys.ibm.pc.rt
Subject: Patch for /sys/ca/fpglue.s
Summary: Fixes times for gprof
Keywords: V1.7 gprof
Message-ID: <1512@ibmpa.UUCP>
Date: 24 Jul 89 21:57:55 GMT
References: <1511@ibmpa.UUCP>
Sender: news@ibmpa.UUCP
Reply-To: brunner@ibmsupt.UUCP ()
Organization: IBM AWD Palo Alto
Lines: 99

Subject: Fix for kernel profiling
Index: /sys/ca/fpglue.s

Description:
	Kernel profiling gives incorrect times for fpglue.

Fix:
	Apply the attached patch.

*** fpglue.s	Fri Jul  7 10:15:11 1989
--- fpglue.s.fix	Thu Jul 13 14:48:53 1989
***************
*** 28,34 ****
  
  	.globl	FPGLUE
  	.globl  fpglue
! #if defined(KERNEL) || defined(PROFILE)
  	.globl	_.fpgen			# necessary to call fpgen() directly
  	.globl	_fpgen			# necessary to call fpgen() directly
  #endif KERNEL
--- 28,34 ----
  
  	.globl	FPGLUE
  	.globl  fpglue
! #if defined(KERNEL) || defined(PROFILE) || defined(GPROF)
  	.globl	_.fpgen			# necessary to call fpgen() directly
  	.globl	_fpgen			# necessary to call fpgen() directly
  #endif KERNEL
***************
*** 35,41 ****
  	.globl	.oVncs
  	.set	.oVncs,0
  
! #ifdef PROFILE
  	.data
  	.align	2
  .fpglue:
--- 35,41 ----
  	.globl	.oVncs
  	.set	.oVncs,0
  
! #if defined(PROFILE) || defined(GPROF)
  	.data
  	.align	2
  .fpglue:
***************
*** 61,67 ****
  	st	r0,-40(sp)		# change return address by  
  					# override the stored r15
  	cal	sp,-100(sp)		# move stack pointer
! #ifdef PROFILE
  	mr	r12,r15			# remember where RTFL block starts
  	get	r14,$.fpglue
  	bali	r15,mcount
--- 61,67 ----
  	st	r0,-40(sp)		# change return address by  
  					# override the stored r15
  	cal	sp,-100(sp)		# move stack pointer
! #if defined(PROFILE) || defined(GPROF)
  	mr	r12,r15			# remember where RTFL block starts
  	get	r14,$.fpglue
  	bali	r15,mcount
***************
*** 110,116 ****
  	ti	4,r6,6			# tlti r6,6
  #endif
  
! #if defined(KERNEL) || defined(PROFILE)
  	get	r6,$fp_genaddr		# calling fpgen() directly
  #else
   	get	r6,$fp_CodeGen		# addr of ptr to fpgen()
--- 110,116 ----
  	ti	4,r6,6			# tlti r6,6
  #endif
  
! #if defined(KERNEL) || defined(PROFILE) || defined(GPROF)
  	get	r6,$fp_genaddr		# calling fpgen() directly
  #else
   	get	r6,$fp_CodeGen		# addr of ptr to fpgen()
***************
*** 182,188 ****
  
  	.data
  	.align	2
! #if defined(KERNEL) || defined(PROFILE)
  fp_genaddr:	.long	_fpgen		# for calling fpgen() directly
  #endif KERNEL
  
--- 182,188 ----
  
  	.data
  	.align	2
! #if defined(KERNEL) || defined(PROFILE) || defined(GPROF)
  fp_genaddr:	.long	_fpgen		# for calling fpgen() directly
  #endif KERNEL
  

Eric Brunner
uunet!ibmsupt!brunner


