Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp697378pxv; Thu, 1 Jul 2021 07:24:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbEfkq+LYBSqSyHjBkQ0iaD7r+FVzA9DkMy/guxw0P/7mv3bh6yJeWqMt0pKsikAoeyVp1 X-Received: by 2002:a05:6e02:1be8:: with SMTP id y8mr5713687ilv.152.1625149459663; Thu, 01 Jul 2021 07:24:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625149459; cv=none; d=google.com; s=arc-20160816; b=jyMKyoIsS7rR572jMz7Lg1KnQbHKpJv+NewwazNwPhORwV3Rv8S5DuyFqMExsGnFQs ZbEuTeVAc6Dpikok+UFaG2lAjnv9Vuf+c/jmZyZjTmjTZuXPhmKQV3x6XMqrhmfNSkX/ 4aVZfTLVeabMpUlMWn08H37ey2QIQnUziPHwuf1RrVE7Xq60lGFxYEE8YWZs7QACGVoM 6wZUZFJwMO1fovle3iwH1UYhsV1UL0SCV2yFG1Fs9+tN9GxGTihGAThYbfdYW+KqRDPH gHBv8Xiea/WrDlxfhQdLRqJdvEYYUmLRFp64fy1QUVGZAFpeFC6nW2M6S6hBRCgC/mzL frww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=drMhQqo9vmvl+nKpZmxz1vI6IPJY5I8TM4LgzjXoGKM=; b=l/oIPDR1sMGZNgrjWm6YVFlxBssJQl2mn7sLh2N7mRXPGCngA7CsJ9HZVKNcB2TXwp ITUv6V+vlRdMdBJQr+soWDx/lWuqyYKuFgzVXljMtkUBGRoYl3Nja+1GxZ+G0kgDMLtd GanUvgEPCWYlRTKpZTZhhez9Hq23gOEpuDBww2nYeycPkxApv8MZDHvpYpcGiCRJ+jii ZQhbxVA8QwZ8s4lmO6fhtyC/e9QPsOApRMBPeTRLD/RoyYQQtXNTcX3tvK6eyo6q6QUv 6l5ab/LU1lmgm8tj3DgIfezdrvNrIUsWkKrxgyK8bqBzrlHzTMO4Pew0+xSQX8mH+AnL Li9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dBv+FAd7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si68141jap.86.2021.07.01.07.24.06; Thu, 01 Jul 2021 07:24:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dBv+FAd7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233144AbhGAOZy (ORCPT + 99 others); Thu, 1 Jul 2021 10:25:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:36604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233099AbhGAOZx (ORCPT ); Thu, 1 Jul 2021 10:25:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C7E06613FE; Thu, 1 Jul 2021 14:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625149403; bh=71dtrSrZfrzS+xQNIPrnzH/rK7SELJ0qjeko7lo3GbY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dBv+FAd78+T0qfW/ZsK3Wa9bq9Zv+49V7xKPG+QuODWvzsomfzRUAHl+jo8FwR4Ab rg7IkFiKaya0h0w140sNdsdyUgqOmQEMQgNbMpUh+UyH1Mkiofxb51oHj52IDpQbnb 39tok0eAaG4WsilBYj+VZVEhYd7ghIbutInXC1H4b/fZwLh/TzLaDzRTiimRxlZlHP hawNZl2XNhiqnozEnemp7T7q3Uuuuh3nB3jfr34XHAhFkT7krVj9Engd9fYSNFnS2j cZhdjf2q/z1Ik6yfIcOlqOIPDz/GUab67saHkI2z7xfWberoWyNV+PPa6NW+MN6NN6 npNXp/fe+Nh/g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 11F1040B1A; Thu, 1 Jul 2021 11:23:19 -0300 (-03) Date: Thu, 1 Jul 2021 11:23:18 -0300 From: Arnaldo Carvalho de Melo To: "Bayduraev, Alexey V" Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel , Andi Kleen , Adrian Hunter , Alexander Antonov , Alexei Budankov , Riccardo Mancini Subject: Re: [PATCH v8 01/22] perf record: Introduce thread affinity and mmap masks Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 01, 2021 at 04:05:09PM +0300, Bayduraev, Alexey V escreveu: > Hi, > > On 30.06.2021 19:17, Arnaldo Carvalho de Melo wrote: > > Em Wed, Jun 30, 2021 at 06:54:40PM +0300, Alexey Bayduraev escreveu: > [SNIP] > >> +static void record__mmap_cpu_mask_free(struct mmap_cpu_mask *mask) > >> +{ > >> + bitmap_free(mask->bits); > >> + mask->nbits = 0; > > > > Plese use NULL, as 'mask->nbits' is a pointer. > > In perf/util/mmap.h "nbits" is size_t: > > struct mmap_cpu_mask { > unsigned long *bits; > size_t nbits; > }; My bad, I saw the pattern of: *_free(mask->bits); mask->bits = 0; Nevermind :-) - Arnaldo