Print this page
4469 DTrace helper tracing should be dynamic

*** 20,29 **** --- 20,30 ---- */ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* * explicitly define DTRACE_ERRDEBUG to pull in definition of dtrace_errhash_t * explicitly define _STDARG_H to avoid stdarg.h/varargs.h u/k defn conflict
*** 1271,1293 **** int dtrace_helptrace_init(mdb_walk_state_t *wsp) { uint32_t next; ! int enabled; if (wsp->walk_addr != NULL) { mdb_warn("dtrace_helptrace only supports global walks\n"); return (WALK_ERR); } ! if (mdb_readvar(&enabled, "dtrace_helptrace_enabled") == -1) { ! mdb_warn("couldn't read 'dtrace_helptrace_enabled'"); return (WALK_ERR); } ! if (!enabled) { mdb_warn("helper tracing is not enabled\n"); return (WALK_ERR); } if (mdb_readvar(&next, "dtrace_helptrace_next") == -1) { --- 1272,1294 ---- int dtrace_helptrace_init(mdb_walk_state_t *wsp) { uint32_t next; ! uintptr_t buffer; if (wsp->walk_addr != NULL) { mdb_warn("dtrace_helptrace only supports global walks\n"); return (WALK_ERR); } ! if (mdb_readvar(&buffer, "dtrace_helptrace_buffer") == -1) { ! mdb_warn("couldn't read 'dtrace_helptrace_buffer'"); return (WALK_ERR); } ! if (buffer == NULL) { mdb_warn("helper tracing is not enabled\n"); return (WALK_ERR); } if (mdb_readvar(&next, "dtrace_helptrace_next") == -1) {