Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
Show First 20 Lines • Show All 309 Lines • ▼ Show 20 Lines | #ifdef illumos | ||||
DT_VERS_1_5, &dt_idops_func, "string(in6_addr_t *)" }, | DT_VERS_1_5, &dt_idops_func, "string(in6_addr_t *)" }, | ||||
#else | #else | ||||
DT_VERS_1_5, &dt_idops_func, "string(struct in6_addr *)" }, | DT_VERS_1_5, &dt_idops_func, "string(struct in6_addr *)" }, | ||||
#endif | #endif | ||||
{ "inet_ntop", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOP, DT_ATTR_STABCMN, | { "inet_ntop", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOP, DT_ATTR_STABCMN, | ||||
DT_VERS_1_5, &dt_idops_func, "string(int, void *)" }, | DT_VERS_1_5, &dt_idops_func, "string(int, void *)" }, | ||||
{ "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0, | { "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0, | ||||
&dt_idops_type, "uint_t" }, | &dt_idops_type, "uint_t" }, | ||||
#ifdef __FreeBSD__ | |||||
{ "jailname", DT_IDENT_SCALAR, 0, DIF_VAR_JAILNAME, | |||||
DT_ATTR_STABCMN, DT_VERS_1_13, &dt_idops_type, "string" }, | |||||
{ "jid", DT_IDENT_SCALAR, 0, DIF_VAR_JID, DT_ATTR_STABCMN, DT_VERS_1_13, | |||||
&dt_idops_type, "int" }, | |||||
markj: Jail IDs are represented internally by an int, so this ought to be an int as well. I realize… | |||||
#endif | |||||
{ "json", DT_IDENT_FUNC, 0, DIF_SUBR_JSON, DT_ATTR_STABCMN, DT_VERS_1_11, | { "json", DT_IDENT_FUNC, 0, DIF_SUBR_JSON, DT_ATTR_STABCMN, DT_VERS_1_11, | ||||
&dt_idops_func, "string(const char *, const char *)" }, | &dt_idops_func, "string(const char *, const char *)" }, | ||||
{ "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0, | { "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0, | ||||
&dt_idops_func, "stack(...)" }, | &dt_idops_func, "stack(...)" }, | ||||
{ "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0, | { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0, | ||||
&dt_idops_func, "string(int64_t, [int])" }, | &dt_idops_func, "string(int64_t, [int])" }, | ||||
{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN, | { "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN, | ||||
DT_VERS_1_7, &dt_idops_func, | DT_VERS_1_7, &dt_idops_func, | ||||
▲ Show 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
{ "uuidtostr", DT_IDENT_FUNC, 0, DIF_SUBR_UUIDTOSTR, DT_ATTR_STABCMN, DT_VERS_1_12_2, | { "uuidtostr", DT_IDENT_FUNC, 0, DIF_SUBR_UUIDTOSTR, DT_ATTR_STABCMN, DT_VERS_1_12_2, | ||||
&dt_idops_func, "string(uintptr_t)" }, | &dt_idops_func, "string(uintptr_t)" }, | ||||
{ "vtimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_VTIMESTAMP, | { "vtimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_VTIMESTAMP, | ||||
DT_ATTR_STABCMN, DT_VERS_1_0, | DT_ATTR_STABCMN, DT_VERS_1_0, | ||||
&dt_idops_type, "uint64_t" }, | &dt_idops_type, "uint64_t" }, | ||||
{ "walltimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_WALLTIMESTAMP, | { "walltimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_WALLTIMESTAMP, | ||||
DT_ATTR_STABCMN, DT_VERS_1_0, | DT_ATTR_STABCMN, DT_VERS_1_0, | ||||
&dt_idops_type, "int64_t" }, | &dt_idops_type, "int64_t" }, | ||||
#ifdef illumos | |||||
{ "zonename", DT_IDENT_SCALAR, 0, DIF_VAR_ZONENAME, | { "zonename", DT_IDENT_SCALAR, 0, DIF_VAR_ZONENAME, | ||||
DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, | DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, | ||||
#endif | |||||
Not Done Inline ActionsI don't think we want to expose "zonename" on FreeBSD. dteske: I don't think we want to expose "zonename" on FreeBSD. | |||||
Not Done Inline ActionsIt's a bit unhelpful that the diff doesn't show the detail of DIF_VAR_JAILNAME being right under DIF_VAR_ZONENAME and falls through to it. The goal is to introduce a compatibility with scripts written on Solaris/illumos and have them work if they use zonename. Presently, we just returned 0 in the kernel, and instead now we check if FreeBSD is defined and fall through to jailname. domagoj.stolfa_gmail.com: It's a bit unhelpful that the diff doesn't show the detail of DIF_VAR_JAILNAME being right… | |||||
#ifndef illumos | #ifndef illumos | ||||
{ "cpu", DT_IDENT_SCALAR, 0, DIF_VAR_CPU, | { "cpu", DT_IDENT_SCALAR, 0, DIF_VAR_CPU, | ||||
DT_ATTR_STABCMN, DT_VERS_1_6_3, &dt_idops_type, "int" }, | DT_ATTR_STABCMN, DT_VERS_1_6_3, &dt_idops_type, "int" }, | ||||
#endif | #endif | ||||
{ NULL, 0, 0, 0, { 0, 0, 0 }, 0, NULL, NULL } | { NULL, 0, 0, 0, { 0, 0, 0 }, 0, NULL, NULL } | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,201 Lines • Show Last 20 Lines |
Jail IDs are represented internally by an int, so this ought to be an int as well. I realize that valid jail IDs are non-negative, but in general we should match the underlying type when possible.