diff options
author | markj <markj@FreeBSD.org> | 2014-02-22 05:18:55 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-02-22 05:18:55 +0000 |
commit | 428d834b5b357ba3730526cfdafbfad8a5b62485 (patch) | |
tree | a083fe7c60a608a89014f48e30f6e24765bbaa44 /cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c | |
parent | 95ac3c80e1d67d3c0fcf4e2d6b54d534042422b2 (diff) | |
download | FreeBSD-src-428d834b5b357ba3730526cfdafbfad8a5b62485.zip FreeBSD-src-428d834b5b357ba3730526cfdafbfad8a5b62485.tar.gz |
1452 DTrace buffer autoscaling should be less violent
illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706
This fixes the tst.resize1.d and tst.resize2.d DTrace tests, which have
been failing since r261122 since they were causing dtrace(1) to attempt to
allocate and use large amounts of memory, and get killed by the OOM killer
as a result.
MFC after: 1 month
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c index 020df2f..c20d250 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -906,30 +904,6 @@ dt_options_load(dtrace_hdl_t *dtp) return (0); } -/*ARGSUSED*/ -static int -dt_opt_preallocate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option) -{ - dtrace_optval_t size; - void *p; - - if (arg == NULL || dt_optval_parse(arg, &size) != 0) - return (dt_set_errno(dtp, EDT_BADOPTVAL)); - - if (size > SIZE_MAX) - size = SIZE_MAX; - - if ((p = dt_zalloc(dtp, size)) == NULL) { - do { - size /= 2; - } while ((p = dt_zalloc(dtp, size)) == NULL); - } - - dt_free(dtp, p); - - return (0); -} - typedef struct dt_option { const char *o_name; int (*o_func)(dtrace_hdl_t *, const char *, uintptr_t); @@ -968,7 +942,6 @@ static const dt_option_t _dtrace_ctoptions[] = { { "linktype", dt_opt_linktype }, { "nolibs", dt_opt_cflags, DTRACE_C_NOLIBS }, { "pgmax", dt_opt_pgmax }, - { "preallocate", dt_opt_preallocate }, { "pspec", dt_opt_cflags, DTRACE_C_PSPEC }, { "setenv", dt_opt_setenv, 1 }, { "stdc", dt_opt_stdc }, |