Deleted Added
full compact
dtrace_subr.c (236567) dtrace_subr.c (238537)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *

--- 5 unchanged lines hidden (view full) ---

14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 *
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *

--- 5 unchanged lines hidden (view full) ---

14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 *
22 * $FreeBSD: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c 236567 2012-06-04 16:15:40Z gnn $
22 * $FreeBSD: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c 238537 2012-07-16 20:17:19Z gnn $
23 *
24 */
25/*
26 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30/*

--- 11 unchanged lines hidden (view full) ---

42#include <sys/dtrace_bsd.h>
43#include <machine/clock.h>
44#include <machine/frame.h>
45#include <vm/pmap.h>
46
47extern uintptr_t dtrace_in_probe_addr;
48extern int dtrace_in_probe;
49
23 *
24 */
25/*
26 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30/*

--- 11 unchanged lines hidden (view full) ---

42#include <sys/dtrace_bsd.h>
43#include <machine/clock.h>
44#include <machine/frame.h>
45#include <vm/pmap.h>
46
47extern uintptr_t dtrace_in_probe_addr;
48extern int dtrace_in_probe;
49
50extern void dtrace_getnanotime(struct timespec *tsp);
51
50int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t);
51
52typedef struct dtrace_invop_hdlr {
53 int (*dtih_func)(uintptr_t, uintptr_t *, uintptr_t);
54 struct dtrace_invop_hdlr *dtih_next;
55} dtrace_invop_hdlr_t;
56
57dtrace_invop_hdlr_t *dtrace_invop_hdlr;

--- 398 unchanged lines hidden (view full) ---

456 hi = tsc >> 32;
457 return (((lo * nsec_scale) >> SCALE_SHIFT) +
458 ((hi * nsec_scale) << (32 - SCALE_SHIFT)));
459}
460
461uint64_t
462dtrace_gethrestime(void)
463{
52int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t);
53
54typedef struct dtrace_invop_hdlr {
55 int (*dtih_func)(uintptr_t, uintptr_t *, uintptr_t);
56 struct dtrace_invop_hdlr *dtih_next;
57} dtrace_invop_hdlr_t;
58
59dtrace_invop_hdlr_t *dtrace_invop_hdlr;

--- 398 unchanged lines hidden (view full) ---

458 hi = tsc >> 32;
459 return (((lo * nsec_scale) >> SCALE_SHIFT) +
460 ((hi * nsec_scale) << (32 - SCALE_SHIFT)));
461}
462
463uint64_t
464dtrace_gethrestime(void)
465{
464 printf("%s(%d): XXX\n",__func__,__LINE__);
465 return (0);
466 struct timespec current_time;
467
468 dtrace_getnanotime(&current_time);
469
470 return (current_time.tv_sec * 1000000000UL + current_time.tv_nsec);
466}
467
468/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */
469int
470dtrace_trap(struct trapframe *frame, u_int type)
471{
472 /*
473 * A trap can occur while DTrace executes a probe. Before

--- 49 unchanged lines hidden ---
471}
472
473/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */
474int
475dtrace_trap(struct trapframe *frame, u_int type)
476{
477 /*
478 * A trap can occur while DTrace executes a probe. Before

--- 49 unchanged lines hidden ---