From 6a39d02719ff34c9f51dd3049add71086572da5a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 25 Oct 2000 20:29:30 +0000 Subject: Update. 2000-10-25 David Mosberger * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Multiply slot number by four to use bins of width 4 to get accurate instruction-level profiling. --- ChangeLog | 6 ++++++ sysdeps/unix/sysv/linux/ia64/profil-counter.h | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1163fba..3ec6463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-10-25 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Multiply slot + number by four to use bins of width 4 to get accurate + instruction-level profiling. + 2000-10-25 Andreas Jaeger * sysdeps/generic/dl-cache.h (CACHEMAGIC_VERSION_NEW): Correct string. diff --git a/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/sysdeps/unix/sysv/linux/ia64/profil-counter.h index 1cc0390..a3e501d 100644 --- a/sysdeps/unix/sysv/linux/ia64/profil-counter.h +++ b/sysdeps/unix/sysv/linux/ia64/profil-counter.h @@ -23,5 +23,10 @@ static void profil_counter (int signr, int code, struct sigcontext *scp) { - profil_count ((void *) scp->sc_ip); + unsigned long ip = scp->sc_ip & ~0X3ULL, slot = scp->sc_ip & 0x3ull; + + /* Note: Linux/ia64 encodes the slot number in bits 0 and 1. We + want to multiply the slot number by four so we can use bins of + width 4 to get accurate instruction-level profiling. */ + profil_count ((void *) (ip + 4*slot)); } -- cgit v1.1