Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp513487ybg; Tue, 9 Jun 2020 06:26:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5nna+bb2b8M/OVHW3JUkmWIQyTUcSbgnSnLvNvZwmoQbM+vy7QzHY7pkDWhJXxS3hv7Bs X-Received: by 2002:a50:b082:: with SMTP id j2mr27329284edd.201.1591709198553; Tue, 09 Jun 2020 06:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591709198; cv=none; d=google.com; s=arc-20160816; b=P+yQymlPAMGJfm+5Emh7xfrwr6vaMz8ciBmsX/CjqvykAuDh+YMmWs3A1L4qAWUmEu nSvb88FYvsdgyUOcR8btYinuehi0b6H0kqzwSDJSvvTLCQkO0wja6xJooMyiiT5DT7em QliGh8LbNT8IaP8Tg/d3FiKCJ55pmzjwx4834wl9kfPVhCHXjqSdWANPNRHgAS7EkQvj u3VvHG16rOKA5USRocQYYZpsGt8HwULDQwgIfZLctdT6If6lj7dm5E32Riikitfv6ffW +onXv3+xjleZ6qS5HLe1K8OlLm7VZn4gYmOrPH1gSsvwW7Qw8lUCMlnYjpp58wy8MTM8 AimQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mxo8zHzg9OIj2A8/73+xEkgtbWWNNXL8j0TJgSXna7E=; b=WTmRHcqEiOR3LCb3sOWpWfxM1GZLDn4ZhNmlEAuVkByu0NiOyX1B2tKOIK5w+c32iH w89E55nTPoPnO5+If+ImPO0tv1/K5CkamHMs0mBaDZtGrgiGCiaL508esDRS5ePC3Knn lu4lSvILJpx8+wlfZt49ApfYId6bLyN1WNlQgerjIS8ukv3ftg1+1gUyrzAefsZmM7C+ INLWlKJ9ae4/7KaDVWu2IoA6wNZmelk3fX0ctY36X9IhDa6JTq9WhhPQQEqUheFDyYAY gBbpjw6613shIxXdh4944IEe3voPIg9XrdVjCEReggoLw0IBPRCjy9tYv9Ks3bOMeYRN Qk5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e1rxoQsQ; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba16si6831044edb.52.2020.06.09.06.26.13; Tue, 09 Jun 2020 06:26:38 -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=@redhat.com header.s=mimecast20190719 header.b=e1rxoQsQ; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbgFINYD (ORCPT + 99 others); Tue, 9 Jun 2020 09:24:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:34691 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726463AbgFINYD (ORCPT ); Tue, 9 Jun 2020 09:24:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591709042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mxo8zHzg9OIj2A8/73+xEkgtbWWNNXL8j0TJgSXna7E=; b=e1rxoQsQqLY9n1iw7hyES34MsTNdTAbTJw2Jx1W8O/znHsAUDhPs2syyJuC9I98MGZ9U1l K0AXxIst/3U6j1gCcBIMloOr/vNqCBu9hPi9ZbMCUrNuad9CLnOaBdcxHGqyIvP+AQzixL kSnBAmQAE4DbFxGnkriNVNHYFXIGyyE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-367-G_pMjGYPPfaCWshcEu8IBw-1; Tue, 09 Jun 2020 09:24:00 -0400 X-MC-Unique: G_pMjGYPPfaCWshcEu8IBw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D7231883600; Tue, 9 Jun 2020 13:23:59 +0000 (UTC) Received: from sandy.ghostprotocols.net (unknown [10.3.128.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9A2C5C1D6; Tue, 9 Jun 2020 13:23:58 +0000 (UTC) Received: by sandy.ghostprotocols.net (Postfix, from userid 1000) id A46C01D5; Tue, 9 Jun 2020 10:23:54 -0300 (BRT) Date: Tue, 9 Jun 2020 10:23:54 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Stephane Eranian , LKML , Jiri Olsa , Peter Zijlstra , mingo@elte.hu Subject: Re: [PATCH] perf headers: fix processing of pmu_mappings Message-ID: <20200609132354.GA8186@redhat.com> References: <20200608161805.65841-1-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jun 08, 2020 at 09:52:43AM -0700, Ian Rogers escreveu: > On Mon, Jun 8, 2020 at 9:18 AM Stephane Eranian wrote: > A lot of the complexity in this code came from strbuf not \0 > terminating strings. Would a strbuf that always \0 terminated be a > useful change? In general there's a lack of consistent style with > strbuf, strcat and asprintf being used in different parts of the code. > Perhaps strbuf use should migrate to asprintf? There are currently I think that going to asprintf is best, this came from long ago, when perf reused parts of the git sources as a starting point. > just 13 callers of strbuf_init. - Arnaldo