1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-01-10 19:23:41 +01:00

Undo some temporary testing hacks.

(Logical change 1.198)
This commit is contained in:
mostang.com!davidm 2004-03-31 07:29:27 +00:00
parent 616931e74d
commit 50c2be0ca3

View file

@ -26,11 +26,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <libunwind.h>
#include <sys/resource.h>
#include <sys/time.h>
#define panic(args...) \
do { fprintf (stderr, args); exit (-1); } while (0)
@ -137,7 +136,7 @@ static void
measure_init (void)
{
# define N 100
# define M 1000000 /* must be at least 2 to get steady-state */
# define M 10 /* must be at least 2 to get steady-state */
double stop, start, get_cold, get_warm, init_cold, init_warm, delta;
struct
{
@ -153,7 +152,6 @@ measure_init (void)
uc[N];
int i, j;
#if 0
/* Run each test M times and take the minimum to filter out noise
such dynamic linker resolving overhead, context-switches,
page-in, cache, and TLB effects. */
@ -199,9 +197,6 @@ measure_init (void)
if (delta < get_warm)
get_warm = delta;
}
#else
unw_getcontext (&uc[0].uc);
#endif
init_warm = 1e99;
for (j = 0; j < M; ++j)
@ -219,7 +214,6 @@ measure_init (void)
1e9 * get_cold, 1e9 * get_warm);
printf ("unw_init_local : cold avg=%9.3f nsec, warm avg=%9.3f nsec\n",
1e9 * init_cold, 1e9 * init_warm);
exit (0);
}
int