Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2905418rdb; Tue, 6 Feb 2024 00:57:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEraylGNfZU+upv0FwWiCmluhjLlAQ3OND5JwSKoXzFSmpU4cyGHnY1yWvM48UsEFzwSaW2 X-Received: by 2002:a17:907:7719:b0:a38:3f60:4f4c with SMTP id kw25-20020a170907771900b00a383f604f4cmr148692ejc.63.1707209824292; Tue, 06 Feb 2024 00:57:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707209824; cv=pass; d=google.com; s=arc-20160816; b=c/sw9dgehGVcrD+dptkA57WP1k5cB/L31wgrSge/fsUMgAMXE8QLvf2U/L6s1ryajL SagNXPWpXBva55z+S1NCuBHKbBG29u85HVbgvCNrsg0eB0oEU8DBDj4/A2D3cvp3YiAM slqJnBRRrDf2DkCJZVBMR9HEAVqhVQTReblXmvmBpuiJpSrKbYQR9o+nN9wT5OF/O1/x B/XGP1YaT/zQNSrj+3AUcUK9PNZoWYAh+GGlA0uqMp5t5069SeKw1ktF6hZsnfgu5uWb W2jY2xZkfAhcO505vsynK5bp6lwEFuY77RNfFh9uqOu5W4auCmcMn24iJfTbZc+/yESx s1+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=j0CHLrBCXuZm2/lScCN+j8B7uj/p62qacpZ+jr+ClZs=; fh=BKsbyWGx3sIkJ/5vjLywQGUVM6eApjShYBorvQG0dtc=; b=Siacfh2bp4ewrFO+2FZKBx7NoJ9dm2NZ2rgCoEazV9b8isyWRjR+1LD2Z1ZfJH/c0B znqwFi1W2axfFd5Li/HCvJhFqiv5NxZFteux11adj44cLvUr3tf/qDYesp+fmTYYHgs4 vJOflaBY+1ARMP5BonHZ8yBSvjRT2N8SJvV6XvmjD3HcDCN+YqjsneaC6r5olLbZC2+i aoLHyu6P+o1YPC0OmsxBlRUtO9UX+YnoK6QDGf2+vsGzhtXapiZ2Iahnat/ZEWoAr6GG gs/IHI+ps2wEBKBKpJmt4XtRorCjWzhJxWCmVBZvsoKzz3v85gnm3e7ayoYR9Fa6U5Ef khew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=foVtXMmx; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-54525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54525-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com X-Forwarded-Encrypted: i=1; AJvYcCUIYR8RUOQkx6vAIkHIPiWPjZarVLgt2eJiqFaqNmufD1iHOLFdyr1AxDtixXh4sRIQQFsH1kI8RpytNOxLpkWLXOOZxuGBBwvlx6ZbqA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l27-20020a170906079b00b00a37c6f954f2si855884ejc.783.2024.02.06.00.57.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:57:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=foVtXMmx; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-54525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54525-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 51BB91F27409 for ; Tue, 6 Feb 2024 08:48:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AE3512BE8E; Tue, 6 Feb 2024 08:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="foVtXMmx" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 492712E3F0; Tue, 6 Feb 2024 08:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707209311; cv=none; b=BJuEY0beoRzFkQ2/JKSNuxDJEQvmmZXp07i+CLRefoTpQZvkGHd+1k/Jjx48Y2c7ozVXv/EW5wCEkj0PdfU7kyzGtqMpDwDgXgkCSjoUhEss0QNDqXJEO5PrduyzaUafh4Rju0famu4uQ+Xc92jtV+DJBdC051xcnlQPCMMlocs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707209311; c=relaxed/simple; bh=+WjsFcTceA8X8B+jIsmK4AkVAO3quMUcgY/eCwA0gnA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=KLMbVqX1UEi03kcak8efPR5ZJx4Q6Km5NGjzbHzDdaEcqdcYPFgMG9S8X/3HUw0xUDPwDmsUMEcFuOqs6Bnn6sSMyprFrWB5l92/rJdsQp4k9qC73Lsu+Z2cnK34dgb3zn5GpwvlkPbxd5eEmVKymph7R3iCuqmLtk8BgBdNii4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=foVtXMmx; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4168gE9h008383; Tue, 6 Feb 2024 08:48:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=j0CHLrBCXuZm2/lScCN+j8B7uj/p62qacpZ+jr+ClZs=; b=foVtXMmx/ORrN7NqDA02NJI/eRI0o91FUUG/X4r3keeVKQw9k3Lwi4iw/fblBQKoANlY Z3s9LrCJ9+MRssoCrxM5fkUYxQ/Wb30y8sz0qVeR7OkzOuqfLr84xrDyJ5ctPmjhyADX c06brdscJKO2iB/lemCA28WQ85JgA7zMI4MkWDAc1nBDn+I6riwbzErIVGxAT0CKDE7y nNg8AFQ/uZh3bw6388r+RUOIfmPsmSDXxb3Wjm56tlCC1DPGDVFppnuxwARckI/+X5mb BT3Qx48fFxyl3z/o641TC4QgYR/CGz5bpgnVkpI7RoDpK8BQZtvMhLOUa2qRrRRVolay Aw== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3hg6g62x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 08:48:21 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4165jXJ7014724; Tue, 6 Feb 2024 08:48:20 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w20tnnvrt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 08:48:19 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4168mHFo12386936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Feb 2024 08:48:17 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5951F20043; Tue, 6 Feb 2024 08:48:17 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2C3E220040; Tue, 6 Feb 2024 08:48:17 +0000 (GMT) Received: from tuxmaker.linux.ibm.com (unknown [9.152.85.9]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 6 Feb 2024 08:48:17 +0000 (GMT) From: Sven Schnelle To: Steven Rostedt Cc: Masami Hiramatsu , Mathieu Desnoyers , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mete Durlu Subject: Re: [PATCH] tracing: use ring_buffer_record_is_set_on() in tracer_tracing_is_on() In-Reply-To: (Sven Schnelle's message of "Tue, 06 Feb 2024 07:32:08 +0100") References: <20240205065340.2848065-1-svens@linux.ibm.com> <20240205075504.1b55f29c@rorschach.local.home> <20240205092353.523cc1ef@rorschach.local.home> Date: Tue, 06 Feb 2024 09:48:16 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Fn1fDA3yR4AlgQT39UDWfGUeDdOdEdlK X-Proofpoint-ORIG-GUID: Fn1fDA3yR4AlgQT39UDWfGUeDdOdEdlK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-06_02,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxlogscore=720 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402060061 Sven Schnelle writes: > Looking at trace_save_cmdline(): > > tpid = tsk->pid & (PID_MAX_DEFAULT - 1); where PID_MAX_DEFAULT = 0x8000 > > so this is basically > > tpid = tsk->pid & 0x7fff; > > further on: > > // might clash with other pid if (otherpid & 0x7fff) == (tsk->pid & 0x7fff) > idx = savedcmd->map_pid_to_cmdline[tpid]; > if (idx == NO_CMDLINE_MAP) { > // This will pick an existing entry if there are > // more than cmdline_num entries present > idx = (savedcmd->cmdline_idx + 1) % savedcmd->cmdline_num; > savedcmd->map_pid_to_cmdline[tpid] = idx; > savedcmd->cmdline_idx = idx; > } > > So i think the problem that sometimes '<...>' instead of the correct > comm is logged is just expected behaviour given the code above. I added some logging, and the test is not triggering this issue. So i assume the default of 128 cmdline entries is just to small. Sorry for the noise. Lets see whether we're still triggering some failures with the other fix applied in CI. If we do, maybe we want to increase the saved_cmdline_size for the ftrace test suite.