about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-10-25 20:29:30 +0000
committerUlrich Drepper <drepper@redhat.com>2000-10-25 20:29:30 +0000
commit6a39d02719ff34c9f51dd3049add71086572da5a (patch)
treeb8ba2075e98fd560c7e4f402e8bccd3f315aa177 /sysdeps
parentfb9c4974822da36f0d5900163282ec85c6f0c7eb (diff)
downloadglibc-6a39d02719ff34c9f51dd3049add71086572da5a.tar.gz
glibc-6a39d02719ff34c9f51dd3049add71086572da5a.tar.xz
glibc-6a39d02719ff34c9f51dd3049add71086572da5a.zip
Update.
2000-10-25  David Mosberger  <davidm@hpl.hp.com>

	* 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.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/profil-counter.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/profil-counter.h b/sysdeps/unix/sysv/linux/ia64/profil-counter.h
index 1cc0390b8f..a3e501dd89 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));
 }