Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1099465lqj; Mon, 3 Jun 2024 10:04:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeQsKz0Qoc3pZxUlJACs2y/Maw4zbJE+ZNfXS4vxwFkVmriiDZh49+/11aTGZ4X0kp9ZH1ph9Z9XLMeOpEAL2ONhSW4lFVoSy+VfXZhQ== X-Google-Smtp-Source: AGHT+IEgzsGCAcHtKD4ItEr27mvGrGsrzGTV4UKR2CA1tT+dz4LFR1A+fx0TK2pc6SzE5E/ZlFbY X-Received: by 2002:a54:4602:0:b0:3d1:cc2a:f142 with SMTP id 5614622812f47-3d1e34a1acdmr9162365b6e.34.1717434249060; Mon, 03 Jun 2024 10:04:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717434249; cv=pass; d=google.com; s=arc-20160816; b=dCzxfcsCUv7s/F4hGQKH+WuDCkeXR4PFKIyJW+nZ+3/i8Fk/dZ+5sgPDuwQnHOoIMw nnvOrVoctn6MKyOmHYPtQln/T162xWQRqAIetadA5RNt5IHm2JUhw7hih1WXJN1JLtqL C9FTiJKxG8aYI2fVnpAjVHKjM4lcM6WraWbSnW9e0SCNo5w//Lca8eA0YfORP3+VVQqX nIHRavDTYbvPCqcwbJNlwNG2O6fS1LOcVNaW0WZ1YHmoRJO0oBto/pY3SOrB0vzMaiPX mlkQYz4pz+umT5oDMgUSiWa5BDEHCEHZgJkimlSQ2Fk+yWICmVgNqsTyk8NrtBe+qqaU v1OA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=ClwDgZ3lvxwjaP8nNMIqj41RA2EDBTl+RHmhDVzVwss=; fh=CONbk9IM1KeoX7M3ojYzAuH3rM9roTZPm7jJ9UBDXA8=; b=VpQ5czBGCKTL/9T5vP4gvB0HRzQUPDwdi3Vu8RytNCDPJZt1LunC6AnbUE4r35SBGs 86Gf84LThTb6cz04xoMZnsvGFLnhbJY4DwehkOMTUrBcZ/otr4Sd5VKB77FodidIEn1F YaoKkAMnewXHkw325hVAiWoimYN3MPn9TbwL9GOKErqs6xx7wy7UqpAIk5WjzSxCoBJ4 56/uRuI9kFuHxFp2tGo1HFbmscGjRucWxA37SdKzFLOC62GrqZKwyC2i4FxTSI0j6M6Z jp+1prjbmmdjb0aQmmPD2dYSTlLXDPAXpYqslPqUcVCmzqgxenu4euRBF1pmZWjfO/Y5 nAaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-199479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199479-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 71dfb90a1353d-4eafedbeb1esi1614628e0c.51.2024.06.03.10.04.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 10:04:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-199479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199479-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B4E571C21F70 for ; Mon, 3 Jun 2024 17:04:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C68BF136E12; Mon, 3 Jun 2024 17:04:01 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 46170132134; Mon, 3 Jun 2024 17:04:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717434241; cv=none; b=hbh1K8s6KavBiswKfzXKRs/lMuINH4qLL8ZwIWgSMUnk7CB3cCamIdP8MsbxQVL4o6g0GXHK5NnhEShtz50TNvNeImNMD9n/a5/IHQWhaWENg7ibA3M38vyQkeeKJVYEVl5ldYPc6LPGv3PaO+z3GMJ16a7CfXk6Pcm3FMC/LU4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717434241; c=relaxed/simple; bh=G26QvN9xTTTYABXqFBCt3dCEqPCMNmgVPrxa6IIQpDE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E26njBLYYq6NuGzDE2ymP1a0FyyQgcY6s9Q7SKXi83L9c00HPTqnYsTQVnP9m4SzA7Eenglr0GMBbwBqyOBrc33bxfamZIB23taFv6JEppqGGb9cafrm0R4qwIjjr6wcbrZLaiALI6Go4a66fUB+S0+ymczcXb4aJHrdQhQ8noE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6ADEC2BD10; Mon, 3 Jun 2024 17:03:57 +0000 (UTC) Date: Mon, 3 Jun 2024 13:05:04 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mark Rutland , Mathieu Desnoyers , Andrew Morton , Alexei Starovoitov , Florent Revest , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: Re: [PATCH v2 10/27] ftrace: Add subops logic to allow one ops to manage many Message-ID: <20240603130504.7c572649@gandalf.local.home> In-Reply-To: <20240603114636.63b5abe2189cb732bec2474c@kernel.org> References: <20240602033744.563858532@goodmis.org> <20240602033832.709653366@goodmis.org> <20240603103316.3af9dea3214a5d2bde721cd8@kernel.org> <20240602220613.3f9eac04@gandalf.local.home> <20240603114636.63b5abe2189cb732bec2474c@kernel.org> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 3 Jun 2024 11:46:36 +0900 Masami Hiramatsu (Google) wrote: > > > at the beginning of the loop. > > > Also, at the end of the loop, > > > > > > if (ftrace_hash_empty(new_hash)) { > > > free_ftrace_hash(new_hash); > > > new_hash = EMPTY_HASH; > > > break; > > > } > > And we still need this (I think this should be done in intersect_hash(), we just > need to count the number of entries.) Ah, I see. if it ends with nothing intersecting it should be empty. I added: /* If nothing intersects, make it the empty set */ if (ftrace_hash_empty(*hash)) { free_ftrace_hash(*hash); *hash = EMPTY_HASH; } to the end of intersect_hash(). -- Steve