Deleted Added
full compact
dt_aggregate.c (178558) dt_aggregate.c (211554)
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 (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

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

31#include <errno.h>
32#include <unistd.h>
33#include <dt_impl.h>
34#include <assert.h>
35#if defined(sun)
36#include <alloca.h>
37#else
38#include <sys/sysctl.h>
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 (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

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

31#include <errno.h>
32#include <unistd.h>
33#include <dt_impl.h>
34#include <assert.h>
35#if defined(sun)
36#include <alloca.h>
37#else
38#include <sys/sysctl.h>
39#include <libproc_compat.h>
39#endif
40#include <limits.h>
41
42#define DTRACE_AHASHSIZE 32779 /* big 'ol prime */
43
44/*
45 * Because qsort(3C) does not allow an argument to be passed to a comparison
46 * function, the variables that affect comparison must regrettably be global;

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

259 if (dtp->dt_vector != NULL)
260 return;
261
262 if ((P = dt_proc_grab(dtp, pid, PGRAB_RDONLY | PGRAB_FORCE, 0)) == NULL)
263 return;
264
265 dt_proc_lock(dtp, P);
266
40#endif
41#include <limits.h>
42
43#define DTRACE_AHASHSIZE 32779 /* big 'ol prime */
44
45/*
46 * Because qsort(3C) does not allow an argument to be passed to a comparison
47 * function, the variables that affect comparison must regrettably be global;

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

260 if (dtp->dt_vector != NULL)
261 return;
262
263 if ((P = dt_proc_grab(dtp, pid, PGRAB_RDONLY | PGRAB_FORCE, 0)) == NULL)
264 return;
265
266 dt_proc_lock(dtp, P);
267
267#if defined(sun)
268 if (Plookup_by_addr(P, *pc, NULL, 0, &sym) == 0)
268 if (Plookup_by_addr(P, *pc, NULL, 0, &sym) == 0)
269#else
270 if (proc_addr2sym(P, *pc, NULL, 0, &sym) == 0)
271#endif
272 *pc = sym.st_value;
273
274 dt_proc_unlock(dtp, P);
275 dt_proc_release(dtp, P);
276}
277
278static void
279dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data)

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

286 if (dtp->dt_vector != NULL)
287 return;
288
289 if ((P = dt_proc_grab(dtp, pid, PGRAB_RDONLY | PGRAB_FORCE, 0)) == NULL)
290 return;
291
292 dt_proc_lock(dtp, P);
293
269 *pc = sym.st_value;
270
271 dt_proc_unlock(dtp, P);
272 dt_proc_release(dtp, P);
273}
274
275static void
276dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data)

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

283 if (dtp->dt_vector != NULL)
284 return;
285
286 if ((P = dt_proc_grab(dtp, pid, PGRAB_RDONLY | PGRAB_FORCE, 0)) == NULL)
287 return;
288
289 dt_proc_lock(dtp, P);
290
294#if defined(sun)
295 if ((map = Paddr_to_map(P, *pc)) != NULL)
291 if ((map = Paddr_to_map(P, *pc)) != NULL)
296#else
297 if ((map = proc_addr2map(P, *pc)) != NULL)
298#endif
299 *pc = map->pr_vaddr;
300
301 dt_proc_unlock(dtp, P);
302 dt_proc_release(dtp, P);
303}
304
305static void
306dt_aggregate_sym(dtrace_hdl_t *dtp, uint64_t *data)

--- 1580 unchanged lines hidden ---
292 *pc = map->pr_vaddr;
293
294 dt_proc_unlock(dtp, P);
295 dt_proc_release(dtp, P);
296}
297
298static void
299dt_aggregate_sym(dtrace_hdl_t *dtp, uint64_t *data)

--- 1580 unchanged lines hidden ---