Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain/gprof Make gmon work a bit on sparcv9 mac...
details: https://anonhg.NetBSD.org/src/rev/3655a9264e00
branches: trunk
changeset: 495736:3655a9264e00
user: eeh <eeh%NetBSD.org@localhost>
date: Thu Aug 03 21:42:01 2000 +0000
description:
Make gmon work a bit on sparcv9 machines.
diffstat:
gnu/dist/toolchain/gprof/gmon.h | 6 +++---
gnu/dist/toolchain/gprof/gmon_io.c | 4 ++++
2 files changed, 7 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 86819e75def4 -r 3655a9264e00 gnu/dist/toolchain/gprof/gmon.h
--- a/gnu/dist/toolchain/gprof/gmon.h Thu Aug 03 21:14:19 2000 +0000
+++ b/gnu/dist/toolchain/gprof/gmon.h Thu Aug 03 21:42:01 2000 +0000
@@ -39,7 +39,7 @@
{
/* FIXME: Checking a host compiler define means that we can't use
a cross gprof to the alpha. */
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__arch64__)
char low_pc[8]; /* base pc address of sample buffer */
char high_pc[8]; /* max pc address of sampled buffer */
#else
@@ -59,7 +59,7 @@
{
/* FIXME: Checking a host compiler define means that we can't use
a cross gprof to the alpha. */
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__arch64__)
char low_pc[8]; /* base pc address of sample buffer */
char high_pc[8]; /* max pc address of sampled buffer */
#else
@@ -136,7 +136,7 @@
{
/* FIXME: Checking a host compiler define means that we can't use
a cross gprof to the alpha. */
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__arch64__)
char from_pc[8];
char self_pc[8];
char count[8];
diff -r 86819e75def4 -r 3655a9264e00 gnu/dist/toolchain/gprof/gmon_io.c
--- a/gnu/dist/toolchain/gprof/gmon_io.c Thu Aug 03 21:14:19 2000 +0000
+++ b/gnu/dist/toolchain/gprof/gmon_io.c Thu Aug 03 21:42:01 2000 +0000
@@ -296,7 +296,11 @@
++narcs;
from_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.from_pc);
self_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.self_pc);
+#if defined(__arch64__)
+ count = bfd_get_64 (core_bfd, (bfd_byte *) raw_arc.count);
+#else
count = bfd_get_32 (core_bfd, (bfd_byte *) raw_arc.count);
+#endif
DBG (SAMPLEDEBUG,
printf ("[gmon_out_read] frompc 0x%lx selfpc 0x%lx count %lu\n",
(unsigned long) from_pc, (unsigned long) self_pc, count));
Home |
Main Index |
Thread Index |
Old Index