mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-26 18:20:29 +01:00
Undo some temporary testing hacks.
(Logical change 1.198)
This commit is contained in:
parent
616931e74d
commit
50c2be0ca3
1 changed files with 2 additions and 8 deletions
|
@ -26,11 +26,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include <libunwind.h>
|
#include <libunwind.h>
|
||||||
|
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#define panic(args...) \
|
#define panic(args...) \
|
||||||
do { fprintf (stderr, args); exit (-1); } while (0)
|
do { fprintf (stderr, args); exit (-1); } while (0)
|
||||||
|
@ -137,7 +136,7 @@ static void
|
||||||
measure_init (void)
|
measure_init (void)
|
||||||
{
|
{
|
||||||
# define N 100
|
# 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;
|
double stop, start, get_cold, get_warm, init_cold, init_warm, delta;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -153,7 +152,6 @@ measure_init (void)
|
||||||
uc[N];
|
uc[N];
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Run each test M times and take the minimum to filter out noise
|
/* Run each test M times and take the minimum to filter out noise
|
||||||
such dynamic linker resolving overhead, context-switches,
|
such dynamic linker resolving overhead, context-switches,
|
||||||
page-in, cache, and TLB effects. */
|
page-in, cache, and TLB effects. */
|
||||||
|
@ -199,9 +197,6 @@ measure_init (void)
|
||||||
if (delta < get_warm)
|
if (delta < get_warm)
|
||||||
get_warm = delta;
|
get_warm = delta;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
unw_getcontext (&uc[0].uc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
init_warm = 1e99;
|
init_warm = 1e99;
|
||||||
for (j = 0; j < M; ++j)
|
for (j = 0; j < M; ++j)
|
||||||
|
@ -219,7 +214,6 @@ measure_init (void)
|
||||||
1e9 * get_cold, 1e9 * get_warm);
|
1e9 * get_cold, 1e9 * get_warm);
|
||||||
printf ("unw_init_local : cold avg=%9.3f nsec, warm avg=%9.3f nsec\n",
|
printf ("unw_init_local : cold avg=%9.3f nsec, warm avg=%9.3f nsec\n",
|
||||||
1e9 * init_cold, 1e9 * init_warm);
|
1e9 * init_cold, 1e9 * init_warm);
|
||||||
exit (0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue