mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overhead
Without HP_TIMING_ACCUM, dl_hp_timing_overhead is write-only. If we remove it, there's no point in HP_TIMING_DIFF_INIT either.
This commit is contained in:
@ -69,8 +69,6 @@ int ret, do_srandom;
|
|||||||
unsigned int seed;
|
unsigned int seed;
|
||||||
size_t page_size;
|
size_t page_size;
|
||||||
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
||||||
|
|
||||||
# ifndef ITERATIONS
|
# ifndef ITERATIONS
|
||||||
size_t iterations = 100000;
|
size_t iterations = 100000;
|
||||||
# define ITERATIONS_OPTIONS \
|
# define ITERATIONS_OPTIONS \
|
||||||
|
@ -22,16 +22,11 @@
|
|||||||
#if HP_TIMING_AVAIL && !defined USE_CLOCK_GETTIME
|
#if HP_TIMING_AVAIL && !defined USE_CLOCK_GETTIME
|
||||||
# define GL(x) _##x
|
# define GL(x) _##x
|
||||||
# define GLRO(x) _##x
|
# define GLRO(x) _##x
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
||||||
typedef hp_timing_t timing_t;
|
typedef hp_timing_t timing_t;
|
||||||
|
|
||||||
# define TIMING_TYPE "hp_timing"
|
# define TIMING_TYPE "hp_timing"
|
||||||
|
|
||||||
# define TIMING_INIT(res) \
|
# define TIMING_INIT(res) ({ (res) = 1; })
|
||||||
({ \
|
|
||||||
HP_TIMING_DIFF_INIT(); \
|
|
||||||
(res) = 1; \
|
|
||||||
})
|
|
||||||
|
|
||||||
# define TIMING_NOW(var) HP_TIMING_NOW (var)
|
# define TIMING_NOW(var) HP_TIMING_NOW (var)
|
||||||
# define TIMING_DIFF(diff, start, end) HP_TIMING_DIFF ((diff), (start), (end))
|
# define TIMING_DIFF(diff, start, end) HP_TIMING_DIFF ((diff), (start), (end))
|
||||||
|
@ -279,9 +279,6 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
|
|||||||
else
|
else
|
||||||
start_time = info->start_time;
|
start_time = info->start_time;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize the timing functions. */
|
|
||||||
HP_TIMING_DIFF_INIT ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transfer data about ourselves to the permanent link_map structure. */
|
/* Transfer data about ourselves to the permanent link_map structure. */
|
||||||
|
@ -45,9 +45,6 @@
|
|||||||
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
- HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
|
|
||||||
HP_TIMING_DIFF macro.
|
|
||||||
|
|
||||||
- HP_TIMING_DIFF: compute difference between two times and store it
|
- HP_TIMING_DIFF: compute difference between two times and store it
|
||||||
in a third. Source and destination might overlap.
|
in a third. Source and destination might overlap.
|
||||||
|
|
||||||
@ -80,9 +77,6 @@ typedef unsigned int hp_timing_t;
|
|||||||
(VAR) = (int) (x_) - (int) (x_ >> 32); \
|
(VAR) = (int) (x_) - (int) (x_ >> 32); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* ??? Two rpcc instructions can be scheduled simultaneously. */
|
|
||||||
#define HP_TIMING_DIFF_INIT() do { } while (0)
|
|
||||||
|
|
||||||
/* It's simple arithmetic for us. */
|
/* It's simple arithmetic for us. */
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
|
@ -42,9 +42,6 @@
|
|||||||
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
- HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
|
|
||||||
HP_TIMING_DIFF macro.
|
|
||||||
|
|
||||||
- HP_TIMING_DIFF: compute difference between two times and store it
|
- HP_TIMING_DIFF: compute difference between two times and store it
|
||||||
in a third. Source and destination might overlap.
|
in a third. Source and destination might overlap.
|
||||||
|
|
||||||
@ -62,7 +59,6 @@
|
|||||||
#define HP_TIMING_INLINE (0)
|
#define HP_TIMING_INLINE (0)
|
||||||
typedef int hp_timing_t;
|
typedef int hp_timing_t;
|
||||||
#define HP_TIMING_NOW(var)
|
#define HP_TIMING_NOW(var)
|
||||||
#define HP_TIMING_DIFF_INIT()
|
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End)
|
#define HP_TIMING_DIFF(Diff, Start, End)
|
||||||
#define HP_TIMING_ACCUM_NT(Sum, Diff)
|
#define HP_TIMING_ACCUM_NT(Sum, Diff)
|
||||||
#define HP_TIMING_PRINT(Buf, Len, Val)
|
#define HP_TIMING_PRINT(Buf, Len, Val)
|
||||||
|
@ -532,11 +532,6 @@ struct rtld_global_ro
|
|||||||
/* All search directories defined at startup. */
|
/* All search directories defined at startup. */
|
||||||
EXTERN struct r_search_path_elem *_dl_init_all_dirs;
|
EXTERN struct r_search_path_elem *_dl_init_all_dirs;
|
||||||
|
|
||||||
#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
|
|
||||||
/* Overhead of a high-precision timing measurement. */
|
|
||||||
EXTERN hp_timing_t _dl_hp_timing_overhead;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NEED_DL_SYSINFO
|
#ifdef NEED_DL_SYSINFO
|
||||||
/* Syscall handling improvements. This is very specific to x86. */
|
/* Syscall handling improvements. This is very specific to x86. */
|
||||||
EXTERN uintptr_t _dl_sysinfo;
|
EXTERN uintptr_t _dl_sysinfo;
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
ifeq ($(subdir),csu)
|
|
||||||
sysdep_routines += hp-timing
|
|
||||||
elide-routines.os += hp-timing
|
|
||||||
endif
|
|
||||||
|
|
||||||
# So that we can test __m128's alignment
|
# So that we can test __m128's alignment
|
||||||
stack-align-test-flags += -msse
|
stack-align-test-flags += -msse
|
||||||
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
/* Support for high precision, low overhead timing functions. i686 version.
|
|
||||||
Copyright (C) 1998-2014 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with the GNU C Library; if not, see
|
|
||||||
<http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <hp-timing.h>
|
|
||||||
|
|
||||||
/* We have to define the variable for the overhead. */
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
@ -52,9 +52,6 @@
|
|||||||
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
- HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
|
|
||||||
HP_TIMING_DIFF macro.
|
|
||||||
|
|
||||||
- HP_TIMING_DIFF: compute difference between two times and store it
|
- HP_TIMING_DIFF: compute difference between two times and store it
|
||||||
in a third. Source and destination might overlap.
|
in a third. Source and destination might overlap.
|
||||||
|
|
||||||
@ -83,25 +80,6 @@ typedef unsigned long long int hp_timing_t;
|
|||||||
in accurate clock cycles here so we don't do this. */
|
in accurate clock cycles here so we don't do this. */
|
||||||
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var))
|
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var))
|
||||||
|
|
||||||
/* Use two 'rdtsc' instructions in a row to find out how long it takes. */
|
|
||||||
#define HP_TIMING_DIFF_INIT() \
|
|
||||||
do { \
|
|
||||||
if (GLRO(dl_hp_timing_overhead) == 0) \
|
|
||||||
{ \
|
|
||||||
int __cnt = 5; \
|
|
||||||
GLRO(dl_hp_timing_overhead) = ~0ull; \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
hp_timing_t __t1, __t2; \
|
|
||||||
HP_TIMING_NOW (__t1); \
|
|
||||||
HP_TIMING_NOW (__t2); \
|
|
||||||
if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
|
|
||||||
GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
|
|
||||||
} \
|
|
||||||
while (--__cnt > 0); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* It's simple arithmetic for us. */
|
/* It's simple arithmetic for us. */
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ endif
|
|||||||
|
|
||||||
ifeq ($(subdir), csu)
|
ifeq ($(subdir), csu)
|
||||||
CPPFLAGS-start.S = -D__ASSEMBLY__
|
CPPFLAGS-start.S = -D__ASSEMBLY__
|
||||||
sysdep_routines += hp-timing
|
|
||||||
elide-routines.os += hp-timing
|
|
||||||
|
|
||||||
ifeq (yes,$(build-shared))
|
ifeq (yes,$(build-shared))
|
||||||
# Compatibility
|
# Compatibility
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
/* Support for high precision, low overhead timing functions. IA-64 version.
|
|
||||||
Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with the GNU C Library; if not, see
|
|
||||||
<http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <hp-timing.h>
|
|
||||||
|
|
||||||
/* We have to define the variable for the overhead. */
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
@ -46,9 +46,6 @@
|
|||||||
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
- HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
|
|
||||||
HP_TIMING_DIFF macro.
|
|
||||||
|
|
||||||
- HP_TIMING_DIFF: compute difference between two times and store it
|
- HP_TIMING_DIFF: compute difference between two times and store it
|
||||||
in a third. Source and destination might overlap.
|
in a third. Source and destination might overlap.
|
||||||
|
|
||||||
@ -84,22 +81,6 @@ typedef unsigned long int hp_timing_t;
|
|||||||
while (REPEAT_READ (__itc)); \
|
while (REPEAT_READ (__itc)); \
|
||||||
Var = __itc; })
|
Var = __itc; })
|
||||||
|
|
||||||
/* Use two 'ar.itc' instructions in a row to find out how long it takes. */
|
|
||||||
#define HP_TIMING_DIFF_INIT() \
|
|
||||||
do { \
|
|
||||||
int __cnt = 5; \
|
|
||||||
GLRO(dl_hp_timing_overhead) = ~0ul; \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
hp_timing_t __t1, __t2; \
|
|
||||||
HP_TIMING_NOW (__t1); \
|
|
||||||
HP_TIMING_NOW (__t2); \
|
|
||||||
if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
|
|
||||||
GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
|
|
||||||
} \
|
|
||||||
while (--__cnt > 0); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* It's simple arithmetic for us. */
|
/* It's simple arithmetic for us. */
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/* Support for high precision, low overhead timing functions.
|
|
||||||
powerpc64 version.
|
|
||||||
Copyright (C) 2005-2014 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with the GNU C Library; if not, see
|
|
||||||
<http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <hp-timing.h>
|
|
||||||
|
|
||||||
/* We have to define the variable for the overhead. */
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
@ -45,9 +45,6 @@
|
|||||||
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
- HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
|
|
||||||
HP_TIMING_DIFF macro.
|
|
||||||
|
|
||||||
- HP_TIMING_DIFF: compute difference between two times and store it
|
- HP_TIMING_DIFF: compute difference between two times and store it
|
||||||
in a third. Source and destination might overlap.
|
in a third. Source and destination might overlap.
|
||||||
|
|
||||||
@ -88,27 +85,6 @@ typedef unsigned long long int hp_timing_t;
|
|||||||
Var = ((hp_timing_t) hi << 32) | lo; \
|
Var = ((hp_timing_t) hi << 32) | lo; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
/* Use two 'mftb' instructions in a row to find out how long it takes.
|
|
||||||
On current POWER4, POWER5, and 970 processors mftb take ~10 cycles. */
|
|
||||||
#define HP_TIMING_DIFF_INIT() \
|
|
||||||
do { \
|
|
||||||
if (GLRO(dl_hp_timing_overhead) == 0) \
|
|
||||||
{ \
|
|
||||||
int __cnt = 5; \
|
|
||||||
GLRO(dl_hp_timing_overhead) = ~0ull; \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
hp_timing_t __t1, __t2; \
|
|
||||||
HP_TIMING_NOW (__t1); \
|
|
||||||
HP_TIMING_NOW (__t2); \
|
|
||||||
if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
|
|
||||||
GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
|
|
||||||
} \
|
|
||||||
while (--__cnt > 0); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* It's simple arithmetic in 64-bit. */
|
/* It's simple arithmetic in 64-bit. */
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
|
@ -35,11 +35,6 @@ CFLAGS-rtld-memmove.os = $(no-special-regs)
|
|||||||
CFLAGS-rtld-memchr.os = $(no-special-regs)
|
CFLAGS-rtld-memchr.os = $(no-special-regs)
|
||||||
CFLAGS-rtld-strnlen.os = $(no-special-regs)
|
CFLAGS-rtld-strnlen.os = $(no-special-regs)
|
||||||
|
|
||||||
ifeq ($(subdir),csu)
|
|
||||||
sysdep_routines += hp-timing
|
|
||||||
elide-routines.os += hp-timing
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(subdir),elf)
|
ifeq ($(subdir),elf)
|
||||||
# help gcc inline asm code from dl-machine.h
|
# help gcc inline asm code from dl-machine.h
|
||||||
+cflags += -finline-limit=2000
|
+cflags += -finline-limit=2000
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/* Support for high precision, low overhead timing functions.
|
|
||||||
powerpc64 version.
|
|
||||||
Copyright (C) 2005-2014 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with the GNU C Library; if not, see
|
|
||||||
<http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <hp-timing.h>
|
|
||||||
|
|
||||||
/* We have to define the variable for the overhead. */
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
@ -45,9 +45,6 @@
|
|||||||
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
- HP_TIMING_NOW: place timestamp for current time in variable given as
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
- HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
|
|
||||||
HP_TIMING_DIFF macro.
|
|
||||||
|
|
||||||
- HP_TIMING_DIFF: compute difference between two times and store it
|
- HP_TIMING_DIFF: compute difference between two times and store it
|
||||||
in a third. Source and destination might overlap.
|
in a third. Source and destination might overlap.
|
||||||
|
|
||||||
@ -80,26 +77,6 @@ typedef unsigned long long int hp_timing_t;
|
|||||||
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mftb %0" : "=r" (Var))
|
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mftb %0" : "=r" (Var))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Use two 'mftb' instructions in a row to find out how long it takes.
|
|
||||||
On current POWER4, POWER5, and 970 processors mftb take ~10 cycles. */
|
|
||||||
#define HP_TIMING_DIFF_INIT() \
|
|
||||||
do { \
|
|
||||||
if (GLRO(dl_hp_timing_overhead) == 0) \
|
|
||||||
{ \
|
|
||||||
int __cnt = 5; \
|
|
||||||
GLRO(dl_hp_timing_overhead) = ~0ull; \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
hp_timing_t __t1, __t2; \
|
|
||||||
HP_TIMING_NOW (__t1); \
|
|
||||||
HP_TIMING_NOW (__t2); \
|
|
||||||
if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
|
|
||||||
GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
|
|
||||||
} \
|
|
||||||
while (--__cnt > 0); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/* It's simple arithmetic in 64-bit. */
|
/* It's simple arithmetic in 64-bit. */
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
|
sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
|
||||||
|
|
||||||
ifeq ($(subdir),csu)
|
|
||||||
sysdep_routines += hp-timing
|
|
||||||
elide-routines.os += hp-timing
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(have-as-vis3),yes)
|
ifeq ($(have-as-vis3),yes)
|
||||||
ASFLAGS-.o += -Wa,-Av9d
|
ASFLAGS-.o += -Wa,-Av9d
|
||||||
ASFLAGS-.os += -Wa,-Av9d
|
ASFLAGS-.os += -Wa,-Av9d
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
/* Support for high precision, low overhead timing functions. sparcv9 version.
|
|
||||||
Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by David S. Miller <davem@redhat.com>, 2001.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with the GNU C Library; if not, see
|
|
||||||
<http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <hp-timing.h>
|
|
||||||
|
|
||||||
/* We have to define the variable for the overhead. */
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
@ -34,21 +34,6 @@ typedef unsigned long long int hp_timing_t;
|
|||||||
"srlx %L0, 32, %H0" \
|
"srlx %L0, 32, %H0" \
|
||||||
: "=r" (Var))
|
: "=r" (Var))
|
||||||
|
|
||||||
#define HP_TIMING_DIFF_INIT() \
|
|
||||||
do { \
|
|
||||||
int __cnt = 5; \
|
|
||||||
GLRO(dl_hp_timing_overhead) = ~0ull; \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
hp_timing_t __t1, __t2; \
|
|
||||||
HP_TIMING_NOW (__t1); \
|
|
||||||
HP_TIMING_NOW (__t2); \
|
|
||||||
if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
|
|
||||||
GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
|
|
||||||
} \
|
|
||||||
while (--__cnt > 0); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
|
#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
ifeq ($(subdir),csu)
|
|
||||||
sysdep_routines += hp-timing
|
|
||||||
elide-routines.os += hp-timing
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(subdir),string)
|
ifeq ($(subdir),string)
|
||||||
sysdep_routines += align-cpy
|
sysdep_routines += align-cpy
|
||||||
endif
|
endif
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
/* Support for high precision, low overhead timing functions. sparc64 version.
|
|
||||||
Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
|
||||||
This file is part of the GNU C Library.
|
|
||||||
Contributed by David S. Miller <davem@redhat.com>, 2001.
|
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with the GNU C Library; if not, see
|
|
||||||
<http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <hp-timing.h>
|
|
||||||
|
|
||||||
/* We have to define the variable for the overhead. */
|
|
||||||
hp_timing_t _dl_hp_timing_overhead;
|
|
@ -31,21 +31,6 @@ typedef unsigned long int hp_timing_t;
|
|||||||
|
|
||||||
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rd %%tick, %0" : "=r" (Var))
|
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rd %%tick, %0" : "=r" (Var))
|
||||||
|
|
||||||
#define HP_TIMING_DIFF_INIT() \
|
|
||||||
do { \
|
|
||||||
int __cnt = 5; \
|
|
||||||
GLRO(dl_hp_timing_overhead) = ~0ull; \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
hp_timing_t __t1, __t2; \
|
|
||||||
HP_TIMING_NOW (__t1); \
|
|
||||||
HP_TIMING_NOW (__t2); \
|
|
||||||
if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
|
|
||||||
GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
|
|
||||||
} \
|
|
||||||
while (--__cnt > 0); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
|
||||||
|
|
||||||
#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
|
#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
long-double-fcts = yes
|
long-double-fcts = yes
|
||||||
|
|
||||||
ifeq ($(subdir),csu)
|
ifeq ($(subdir),csu)
|
||||||
sysdep_routines += hp-timing
|
|
||||||
elide-routines.os += hp-timing
|
|
||||||
gen-as-const-headers += link-defines.sym
|
gen-as-const-headers += link-defines.sym
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
/* We can use the i686 implementation without changes. */
|
|
||||||
#include <sysdeps/i386/i686/hp-timing.c>
|
|
Reference in New Issue
Block a user