From nobody Mon Jul 11 19:59:06 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5B12912AEBE2; Mon, 11 Jul 2022 19:59:06 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LhZTQ20WHz3hQM; Mon, 11 Jul 2022 19:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657569546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZO4/BxLAfN4pwBv4A3/Cp02ra6yAGRE/cC8ZGpzXIh4=; b=VerlGAuVB8sLeBaFHK4BKHbqH8wJwAxiQfhhyVQIJCX3YRq2AUcbwN6NrW5aAU0WSpwKyE dxHMrTHCu/DZm22mbkQKlgBaTgwNGQgeUaR4ifliJcD7sjyKoojT+UC4wf+YZza89QSY8E HfABbLuLDrX3xejH8dLOYhglZWE1Ru9TGt/Je3I4zzAChneSII1VxwA51Q1DrWO7iMBhvs OPii/RjtX7lrhZ2VE0sM5F0Iuxaq6qxJ5Qo1m27N6a2ShHTplvO855DIFeucFeCGm3WwTr OrSHaGRIZoBhybW6CK/QXHZ7aCoCHdKyRolF8P/l8KZlLxSxOkSdCk5fAhZicQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LhZTQ0mspzGq2; Mon, 11 Jul 2022 19:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26BJx6KG003335; Mon, 11 Jul 2022 19:59:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26BJx6bM003334; Mon, 11 Jul 2022 19:59:06 GMT (envelope-from git) Date: Mon, 11 Jul 2022 19:59:06 GMT Message-Id: <202207111959.26BJx6bM003334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ece453d5fade - main - eventtimer: Simplify KTR traces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ece453d5faded062b4a7202a5399fe10417148ef Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657569546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZO4/BxLAfN4pwBv4A3/Cp02ra6yAGRE/cC8ZGpzXIh4=; b=qKuP0MxehK7EMavkUfmmDN1RqG70H85clU1pV+aziMzFtkmYvosGrZlTvKh7ZD50eb+zsr eV5BrkYx87e2MRakNF6AOI7woiyufMqOzrsiW4XviED2CTZhecSAs0ZTHxGG/YE5Ozo1zR kc5VI/bTGdax2eCh5YnB7XA3grDfP6QWVfgd7rCm76gofMcoHtZGr+8Fij29H36poGgfUN M7WdhsGv+EIwP0V0Jlpgcen6lQkYjB7jVTyqlPuBRT5Q97t/Dq4Me+gWCKkkXcz6TOR/en 8TcdKArXu3PpC91HhEOxXnwhgkcpesSQh71bg4so0OwsVSPJKsUwg2E+4soNKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657569546; a=rsa-sha256; cv=none; b=wyWIgziLnkRDDFTc0HeFOaBs8khi2K++hRZ1arcdcrk50+uvcEt2nX9o42vMGzklPtKq9E +L1McQOFqFwHZi3b52GC/Fx45qsyisSp18J3pEC2xa7nxrlZ37Bb5vJqz8sAMGkshdEZ3b mocfMRm12EGQ7sYZy7sHKWN0h4t4GEocn2RgTYWPP+poOQkkVliFch9xNdHeYn2PpU65cB J1Ir/pKnwFZDrM9YBpkU1hv46eXcJ8WpYYPWQ6J+0OiL8HNF69sf3D1brV5KjbxCYMeAiH X/FOcap3CQPNNlDQGjE0emvk5cp2y0sVJIxfLtjISAmdmxKa/N3GgP0RhjG7Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ece453d5faded062b4a7202a5399fe10417148ef commit ece453d5faded062b4a7202a5399fe10417148ef Author: Mark Johnston AuthorDate: 2022-07-05 15:53:32 +0000 Commit: Mark Johnston CommitDate: 2022-07-11 19:58:43 +0000 eventtimer: Simplify KTR traces Stop including the current CPU in all event messages, since it's already saved in KTR log entries and thus is redundant. All eventtimer traces occur in a context where CPU migration is not possible. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/kern/kern_clocksource.c | 37 +++++++++++++++++++------------------ sys/powerpc/powerpc/cpu.c | 6 ++---- sys/x86/x86/cpu_machdep.c | 6 ++---- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c index 89d19bca9317..c7de78367b0b 100644 --- a/sys/kern/kern_clocksource.c +++ b/sys/kern/kern_clocksource.c @@ -144,8 +144,8 @@ hardclockintr(void) return (FILTER_HANDLED); state = DPCPU_PTR(timerstate); now = state->now; - CTR3(KTR_SPARE2, "ipi at %d: now %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff)); + CTR2(KTR_SPARE2, "ipi: now %d.%08x", + (int)(now >> 32), (u_int)(now & 0xffffffff)); done = handleevents(now, 0); return (done ? FILTER_HANDLED : FILTER_STRAY); } @@ -162,8 +162,8 @@ handleevents(sbintime_t now, int fake) int usermode; int done, runs; - CTR3(KTR_SPARE2, "handle at %d: now %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff)); + CTR2(KTR_SPARE2, "handle: now %d.%08x", + (int)(now >> 32), (u_int)(now & 0xffffffff)); done = 0; if (fake) { frame = NULL; @@ -290,8 +290,8 @@ getnextevent(struct pcpu_state *state) } } #endif - CTR4(KTR_SPARE2, "next at %d: next %d.%08x by %d", - curcpu, (int)(event >> 32), (u_int)(event & 0xffffffff), c); + CTR3(KTR_SPARE2, "next: next %d.%08x by %d", + (int)(event >> 32), (u_int)(event & 0xffffffff), c); return (event); } @@ -321,8 +321,8 @@ timercb(struct eventtimer *et, void *arg) else *next = -1; /* Next tick is not scheduled yet. */ state->now = now; - CTR3(KTR_SPARE2, "intr at %d: now %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff)); + CTR2(KTR_SPARE2, "intr: now %d.%08x", + (int)(now >> 32), (u_int)(now & 0xffffffff)); #ifdef SMP #ifdef EARLY_AP_STARTUP @@ -397,8 +397,8 @@ loadtimer(sbintime_t now, int start) new = timerperiod - tmp; if (new < tmp) /* Left less then passed. */ new += timerperiod; - CTR5(KTR_SPARE2, "load p at %d: now %d.%08x first in %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff), + CTR4(KTR_SPARE2, "load p: now %d.%08x first in %d.%08x", + (int)(now >> 32), (u_int)(now & 0xffffffff), (int)(new >> 32), (u_int)(new & 0xffffffff)); *next = new + now; et_start(timer, new, timerperiod); @@ -406,8 +406,8 @@ loadtimer(sbintime_t now, int start) } else { new = getnextevent(state); eq = (new == *next); - CTR4(KTR_SPARE2, "load at %d: next %d.%08x eq %d", - curcpu, (int)(new >> 32), (u_int)(new & 0xffffffff), eq); + CTR3(KTR_SPARE2, "load: next %d.%08x eq %d", + (int)(new >> 32), (u_int)(new & 0xffffffff), eq); if (!eq) { *next = new; et_start(timer, new - now, 0); @@ -772,8 +772,8 @@ cpu_idleclock(void) now = state->now; else now = sbinuptime(); - CTR3(KTR_SPARE2, "idle at %d: now %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff)); + CTR2(KTR_SPARE2, "idle: now %d.%08x", + (int)(now >> 32), (u_int)(now & 0xffffffff)); t = getnextcpuevent(state, 1); state->idle = 1; state->nextevent = t; @@ -801,8 +801,8 @@ cpu_activeclock(void) now = state->now; else now = sbinuptime(); - CTR3(KTR_SPARE2, "active at %d: now %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff)); + CTR2(KTR_SPARE2, "active: now %d.%08x", + (int)(now >> 32), (u_int)(now & 0xffffffff)); td = curthread; td->td_intr_nesting_level++; handleevents(now, 1); @@ -837,8 +837,9 @@ cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt) /* Do not touch anything if somebody reconfiguring timers. */ if (busy) return; - CTR6(KTR_SPARE2, "new co at %d: on %d at %d.%08x - %d.%08x", - curcpu, cpu, (int)(bt_opt >> 32), (u_int)(bt_opt & 0xffffffff), + + CTR5(KTR_SPARE2, "new co: on %d at %d.%08x - %d.%08x", + cpu, (int)(bt_opt >> 32), (u_int)(bt_opt & 0xffffffff), (int)(bt >> 32), (u_int)(bt & 0xffffffff)); KASSERT(!CPU_ABSENT(cpu), ("Absent CPU %d", cpu)); diff --git a/sys/powerpc/powerpc/cpu.c b/sys/powerpc/powerpc/cpu.c index bc70d39676ef..300a738f796d 100644 --- a/sys/powerpc/powerpc/cpu.c +++ b/sys/powerpc/powerpc/cpu.c @@ -715,8 +715,7 @@ cpu_idle(int busy) } #endif - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); + CTR1(KTR_SPARE2, "cpu_idle(%d)", busy); if (cpu_idle_hook != NULL) { if (!busy) { @@ -730,8 +729,7 @@ cpu_idle(int busy) } } - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); + CTR1(KTR_SPARE2, "cpu_idle(%d) done", busy); } static void diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index f20611ffa20e..fa11f64e2779 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -636,8 +636,7 @@ cpu_idle(int busy) uint64_t msr; sbintime_t sbt = -1; - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", - busy, curcpu); + CTR1(KTR_SPARE2, "cpu_idle(%d)", busy); #ifdef MP_WATCHDOG ap_watchdog(PCPU_GET(cpuid)); #endif @@ -673,8 +672,7 @@ cpu_idle(int busy) critical_exit(); } out: - CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", - busy, curcpu); + CTR1(KTR_SPARE2, "cpu_idle(%d) done", busy); } static int cpu_idle_apl31_workaround;