From nobody Tue Feb 10 01:59:58 2026 Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F133B20D517 for ; Sat, 25 Jan 2025 06:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737787629; cv=none; b=NvbJwymdb1M1j7cjbMa0pAVpFMM/QKAOD30/nlgQE3LNCxCBQPtCd+++/uCESTvTD8fSAU6ZHF8R8CQS3bvhqo9onaam3mguFAHXa3Lkh+pO+UDoZn6utFg1WZd//iWCCZkvFI/1S44IZL73AgWv9xnxJKdn0Z19jpHNzE4HKl4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737787629; c=relaxed/simple; bh=pr0VmzINNattEI60wJ1RFGDsny7cikuvn+AUSLWTQCg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SMsReo26GA2XNO5t72sVPRlgZR+4NDi9E3QCjzh9ZBQ9zm9mqmWtWrRejvbVXIUqXs7fBf7+D9N1oHc/s7Dj9serunwkxPsP1S2T2HDHWRvudlWX52qt4esYFp9O/0MQEpodOeswCwnlxr6ThFKDighyqR8hDy/0aVwHi2cFoYM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R8MQsysA; arc=none smtp.client-ip=209.85.166.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R8MQsysA" Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-3ce868498d3so8477475ab.3 for ; Fri, 24 Jan 2025 22:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737787627; x=1738392427; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K2adNnpQ1ndgxlrGpzojCmuFvxvCimDSyhOgF+7GluQ=; b=R8MQsysAi/AXupDtIPeuohJf/wAR18Ay1KnWQquxEB7b1kqzDqkqdzRZnfwVeZbraT QYajoP8fm+bgahv4XJx32j58EcyNloCoJgd/78cmH/ruQACEAcrl1u9HNu3Q0g/ztGb4 JQFK2uHYm45rxCo+1+Z8YNGCjqLzgBeDfRfFJUeS1JtnavDfyLSZBckC924pwAAhkhMi cdYUD4UsHzDYzi2eJTkzMoUqGqlVULs1fnGgtjHXj+St1/m2XjLHG1ktCpFScS1GJQSA i6K2HqwdcmuL7rFNu0uEwTmiVM6X7ptCBIJgm2BbKqse8L9lLtfzRQ8QsziJQX53D1Ss wzSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737787627; x=1738392427; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K2adNnpQ1ndgxlrGpzojCmuFvxvCimDSyhOgF+7GluQ=; b=OacCiiXUtpw94uAfD+EWNU9i6Idxwwpoc+Up1d5uMprf89z/pwU6gzvNkXUH1Q/fTa S8pPjJnzBEF7SqiTKLaUyiPAeivuOO7vpUiRXviHdxJg9g3xqaGSll45RNR9660J+KpV Ia2Zml/l1PLksMB+PkfMzqmVsrfn7xK/lEZ5ROoXQqJoCgHf5RfFKK55sJ3CMZ438OLl ST5S6zUxW0wkYoKLucaz7tLRSzAHIuS/kWIa1et5jMJ7xfif7XJLsufuL4Pu+EJW852L +49v1uifizxNIlLs0YBy92EIcbzGqXeSWJm07y8SlumKS6a/RHUQjW9oiByvGcSjnwd6 5GMg== X-Gm-Message-State: AOJu0Yx+6UlCgCUrs5GxGOT0lukDjAyz6X/HelhJGOJLo6bkIjTRADKU v+7EWPdL8m3yOwS0D3qEoTeg9bnccDd5RlGXxVcRVa2Y1QXuVd+ri3QvTQ== X-Gm-Gg: ASbGnctFB4uCLa6b891B5b0CWrFYyrhHWShu+03qEAK2C39RYrG5OfjMm0IChzdFhky B2YVxIf1wO1OjpUpvDnBsj6ftxU1PEi9lo+u6wp/gztBrQW+HAuttZXinp3pnj1l8PJh85e03qa tztv4Fh9uK/Q1NAtx1nGSdyaDf1yjq6zjpc79/9Ok/MFmm/t6qZQLIUvpGKIzIt69n/H1vVmE76 7xo8R/vNbLGJV4VB1XQ7ZheWRBxWs1DwABHlKENwQh07eheS942KTQqDn79AgVmdTOrulu3j1bg yfTJQ1JGXqsztqQJXn0nxWiCQ0XR4RkQboRPQw== X-Google-Smtp-Source: AGHT+IFvfnXx3vIA0IygucIVFMzusww6a1v559qwPHqvKV9Wy0ZpTiWPO7TpRRif5ApEBz6kamOW3Q== X-Received: by 2002:a05:6e02:3cc2:b0:3ce:791d:7f6 with SMTP id e9e14a558f8ab-3cf74487b41mr262768565ab.16.1737787625414; Fri, 24 Jan 2025 22:47:05 -0800 (PST) Received: from gandalf.. (c-67-165-245-5.hsd1.co.comcast.net. [67.165.245.5]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4ec1da476fesm1174144173.58.2025.01.24.22.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 22:47:05 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: intel-gfx-trybot@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, Jim Cromie Subject: [PATCH 26/63] dyndbg-test: change do_prints testpoint to accept a loopct Date: Fri, 24 Jan 2025 23:45:40 -0700 Message-ID: <20250125064619.8305-27-jim.cromie@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125064619.8305-1-jim.cromie@gmail.com> References: <20250125064619.8305-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" echo 1000 > /sys/module/test_dynamic_debug/parameters/do_prints This allows its use as a scriptable load generator, to generate dynamic-prefix-emits for flag combinations vs undecorated printks. This will make it easy to assess the cost of the prefixing. NB: the count is an unsigned int, and is *not* clamped currently, but probably should be. Signed-off-by: Jim Cromie --- lib/test_dynamic_debug.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index 74b98adc4ed0..5cfc156ca4bb 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c @@ -16,16 +16,24 @@ =20 /* re-gen output by reading or writing sysfs node: do_prints */ =20 -static void do_prints(void); /* device under test */ +static void do_prints(unsigned int); /* device under test */ static int param_set_do_prints(const char *instr, const struct kernel_para= m *kp) { - do_prints(); + int rc; + unsigned int ct; + + rc =3D kstrtouint(instr, 0, &ct); + if (rc) { + pr_err("expecting numeric input, using 1 instead\n"); + ct =3D 1; + } + do_prints(ct); return 0; } static int param_get_do_prints(char *buffer, const struct kernel_param *kp) { - do_prints(); - return scnprintf(buffer, PAGE_SIZE, "did do_prints\n"); + do_prints(1); + return scnprintf(buffer, PAGE_SIZE, "did 1 do_prints\n"); } static const struct kernel_param_ops param_ops_do_prints =3D { .set =3D param_set_do_prints, @@ -177,17 +185,20 @@ static void do_levels(void) prdbg(V7); } =20 -static void do_prints(void) +static void do_prints(unsigned int ct) { - pr_debug("do_prints:\n"); - do_cats(); - do_levels(); + /* maybe clamp this */ + pr_debug("do-prints %d times:\n", ct); + for (; ct; ct--) { + do_cats(); + do_levels(); + } } =20 static int __init test_dynamic_debug_init(void) { pr_debug("init start\n"); - do_prints(); + do_prints(1); pr_debug("init done\n"); return 0; } --=20 2.48.1