mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-09 10:53:43 +01:00
benching: actually bench
This commit is contained in:
parent
b702cead60
commit
b47bfdd204
1 changed files with 4 additions and 1 deletions
|
@ -28,7 +28,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#include "unwind_i.h"
|
#include "unwind_i.h"
|
||||||
#include "../eh_elf/eh_elf.h"
|
#include "../eh_elf/eh_elf.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "remote.h"
|
#include <time.h>
|
||||||
|
#include <libunwind.h>
|
||||||
|
|
||||||
/* Recognise PLT entries such as:
|
/* Recognise PLT entries such as:
|
||||||
3bdf0: ff 25 e2 49 13 00 jmpq *0x1349e2(%rip)
|
3bdf0: ff 25 e2 49 13 00 jmpq *0x1349e2(%rip)
|
||||||
|
@ -57,6 +58,7 @@ is_plt_entry (struct dwarf_cursor *c)
|
||||||
PROTECTED int
|
PROTECTED int
|
||||||
unw_step (unw_cursor_t *cursor)
|
unw_step (unw_cursor_t *cursor)
|
||||||
{
|
{
|
||||||
|
struct timespec _timer_start = chrono_start();
|
||||||
struct cursor *c = (struct cursor *) cursor;
|
struct cursor *c = (struct cursor *) cursor;
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
|
@ -77,6 +79,7 @@ unw_step (unw_cursor_t *cursor)
|
||||||
Debug(2, "eh_elf unwinding failed (%d), falling back\n", ret);
|
Debug(2, "eh_elf unwinding failed (%d), falling back\n", ret);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
chrono_end(_timer_start);
|
||||||
Debug (2, "returning %d\n", ret);
|
Debug (2, "returning %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue