From owner-svn-src-all@freebsd.org Sat Jun 27 00:57:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D3333634F1; Sat, 27 Jun 2020 00:57:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49twMw3j3Fz44c2; Sat, 27 Jun 2020 00:57:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A2C41C8F3; Sat, 27 Jun 2020 00:57:48 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R0vmaL070915; Sat, 27 Jun 2020 00:57:48 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R0vmgC070914; Sat, 27 Jun 2020 00:57:48 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <202006270057.05R0vmgC070914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sat, 27 Jun 2020 00:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362667 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Commit-Revision: 362667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 00:57:48 -0000 Author: mmacy Date: Sat Jun 27 00:57:48 2020 New Revision: 362667 URL: https://svnweb.freebsd.org/changeset/base/362667 Log: Fix "current" variable name conflict with openzfs The variable "current" is an alias for curthread in openzfs. Rename all variable uses of current in dtrace.c to curstate. Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jun 27 00:55:03 2020 (r362666) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jun 27 00:57:48 2020 (r362667) @@ -2780,25 +2780,25 @@ static int dtrace_speculation(dtrace_state_t *state) { int i = 0; - dtrace_speculation_state_t current; + dtrace_speculation_state_t curstate; uint32_t *stat = &state->dts_speculations_unavail, count; while (i < state->dts_nspeculations) { dtrace_speculation_t *spec = &state->dts_speculations[i]; - current = spec->dtsp_state; + curstate = spec->dtsp_state; - if (current != DTRACESPEC_INACTIVE) { - if (current == DTRACESPEC_COMMITTINGMANY || - current == DTRACESPEC_COMMITTING || - current == DTRACESPEC_DISCARDING) + if (curstate != DTRACESPEC_INACTIVE) { + if (curstate == DTRACESPEC_COMMITTINGMANY || + curstate == DTRACESPEC_COMMITTING || + curstate == DTRACESPEC_DISCARDING) stat = &state->dts_speculations_busy; i++; continue; } if (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, DTRACESPEC_ACTIVE) == current) + curstate, DTRACESPEC_ACTIVE) == curstate) return (i + 1); } @@ -2827,7 +2827,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce dtrace_speculation_t *spec; dtrace_buffer_t *src, *dest; uintptr_t daddr, saddr, dlimit, slimit; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; intptr_t offs; uint64_t timestamp; @@ -2844,12 +2844,12 @@ dtrace_speculation_commit(dtrace_state_t *state, proce dest = &state->dts_buffer[cpu]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - if (current == DTRACESPEC_COMMITTINGMANY) + if (curstate == DTRACESPEC_COMMITTINGMANY) break; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_DISCARDING: return; @@ -2891,7 +2891,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce ASSERT(0); } } while (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, new) != current); + curstate, new) != curstate); /* * We have set the state to indicate that we are committing this @@ -2907,7 +2907,7 @@ dtrace_speculation_commit(dtrace_state_t *state, proce /* * We have sufficient space to copy the speculative buffer into the * primary buffer. First, modify the speculative buffer, filling - * in the timestamp of all entries with the current time. The data + * in the timestamp of all entries with the curstate time. The data * must have the commit() time rather than the time it was traced, * so that all entries in the primary buffer are in timestamp order. */ @@ -2970,8 +2970,8 @@ out: * If we're lucky enough to be the only active CPU on this speculation * buffer, we can just set the state back to DTRACESPEC_INACTIVE. */ - if (current == DTRACESPEC_ACTIVE || - (current == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { + if (curstate == DTRACESPEC_ACTIVE || + (curstate == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) { uint32_t rval = dtrace_cas32((uint32_t *)&spec->dtsp_state, DTRACESPEC_COMMITTING, DTRACESPEC_INACTIVE); @@ -2994,7 +2994,7 @@ dtrace_speculation_discard(dtrace_state_t *state, proc dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; dtrace_buffer_t *buf; if (which == 0) @@ -3009,9 +3009,9 @@ dtrace_speculation_discard(dtrace_state_t *state, proc buf = &spec->dtsp_buffer[cpu]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_COMMITTINGMANY: case DTRACESPEC_COMMITTING: @@ -3035,7 +3035,7 @@ dtrace_speculation_discard(dtrace_state_t *state, proc ASSERT(0); } } while (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, new) != current); + curstate, new) != curstate); buf->dtb_offset = 0; buf->dtb_drops = 0; @@ -3127,19 +3127,19 @@ dtrace_speculation_clean(dtrace_state_t *state) */ for (i = 0; i < state->dts_nspeculations; i++) { dtrace_speculation_t *spec = &state->dts_speculations[i]; - dtrace_speculation_state_t current, new; + dtrace_speculation_state_t curstate, new; if (!spec->dtsp_cleaning) continue; - current = spec->dtsp_state; - ASSERT(current == DTRACESPEC_DISCARDING || - current == DTRACESPEC_COMMITTINGMANY); + curstate = spec->dtsp_state; + ASSERT(curstate == DTRACESPEC_DISCARDING || + curstate == DTRACESPEC_COMMITTINGMANY); new = DTRACESPEC_INACTIVE; - rv = dtrace_cas32((uint32_t *)&spec->dtsp_state, current, new); - ASSERT(rv == current); + rv = dtrace_cas32((uint32_t *)&spec->dtsp_state, curstate, new); + ASSERT(rv == curstate); spec->dtsp_cleaning = 0; } } @@ -3156,7 +3156,7 @@ dtrace_speculation_buffer(dtrace_state_t *state, proce dtrace_specid_t which) { dtrace_speculation_t *spec; - dtrace_speculation_state_t current, new = 0; + dtrace_speculation_state_t curstate, new = 0; dtrace_buffer_t *buf; if (which == 0) @@ -3171,9 +3171,9 @@ dtrace_speculation_buffer(dtrace_state_t *state, proce buf = &spec->dtsp_buffer[cpuid]; do { - current = spec->dtsp_state; + curstate = spec->dtsp_state; - switch (current) { + switch (curstate) { case DTRACESPEC_INACTIVE: case DTRACESPEC_COMMITTINGMANY: case DTRACESPEC_DISCARDING: @@ -3209,7 +3209,7 @@ dtrace_speculation_buffer(dtrace_state_t *state, proce ASSERT(0); } } while (dtrace_cas32((uint32_t *)&spec->dtsp_state, - current, new) != current); + curstate, new) != curstate); ASSERT(new == DTRACESPEC_ACTIVEONE || new == DTRACESPEC_ACTIVEMANY); return (buf); @@ -7511,12 +7511,12 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t !state->dts_cred.dcr_destructive || dtrace_destructive_disallow) { void *activity = &state->dts_activity; - dtrace_activity_t current; + dtrace_activity_t curstate; do { - current = state->dts_activity; - } while (dtrace_cas32(activity, current, - DTRACE_ACTIVITY_KILLED) != current); + curstate = state->dts_activity; + } while (dtrace_cas32(activity, curstate, + DTRACE_ACTIVITY_KILLED) != curstate); continue; } @@ -7851,16 +7851,16 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t * thread in COOLDOWN, so there is no race.) */ void *activity = &state->dts_activity; - dtrace_activity_t current = state->dts_activity; + dtrace_activity_t curstate = state->dts_activity; - if (current == DTRACE_ACTIVITY_COOLDOWN) + if (curstate == DTRACE_ACTIVITY_COOLDOWN) break; - if (current != DTRACE_ACTIVITY_WARMUP) - current = DTRACE_ACTIVITY_ACTIVE; + if (curstate != DTRACE_ACTIVITY_WARMUP) + curstate = DTRACE_ACTIVITY_ACTIVE; - if (dtrace_cas32(activity, current, - DTRACE_ACTIVITY_DRAINING) != current) { + if (dtrace_cas32(activity, curstate, + DTRACE_ACTIVITY_DRAINING) != curstate) { *flags |= CPU_DTRACE_DROP; continue; }