Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/dev/dtrace/arm/dtrace_subr.c
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
#define BIT_PC 15 | #define BIT_PC 15 | ||||
#define BIT_LR 14 | #define BIT_LR 14 | ||||
#define BIT_SP 13 | #define BIT_SP 13 | ||||
extern dtrace_id_t dtrace_probeid_error; | extern dtrace_id_t dtrace_probeid_error; | ||||
extern int (*dtrace_invop_jump_addr)(struct trapframe *); | extern int (*dtrace_invop_jump_addr)(struct trapframe *); | ||||
extern void dtrace_getnanotime(struct timespec *tsp); | extern void dtrace_getnanotime(struct timespec *tsp); | ||||
extern void dtrace_getnanouptime(struct timespec *tsp); | |||||
int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); | int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); | ||||
void dtrace_invop_init(void); | void dtrace_invop_init(void); | ||||
void dtrace_invop_uninit(void); | void dtrace_invop_uninit(void); | ||||
typedef struct dtrace_invop_hdlr { | typedef struct dtrace_invop_hdlr { | ||||
int (*dtih_func)(uintptr_t, struct trapframe *, uintptr_t); | int (*dtih_func)(uintptr_t, struct trapframe *, uintptr_t); | ||||
struct dtrace_invop_hdlr *dtih_next; | struct dtrace_invop_hdlr *dtih_next; | ||||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Returns nanoseconds since boot. | * Returns nanoseconds since boot. | ||||
*/ | */ | ||||
uint64_t | uint64_t | ||||
dtrace_gethrtime() | dtrace_gethrtime() | ||||
{ | { | ||||
struct timespec curtime; | struct timespec curtime; | ||||
nanouptime(&curtime); | dtrace_getnanouptime(&curtime); | ||||
return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); | return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); | ||||
} | } | ||||
uint64_t | uint64_t | ||||
dtrace_gethrestime(void) | dtrace_gethrestime(void) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |