Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp810507ybl; Fri, 10 Jan 2020 07:07:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxahHaDqFnZdFmlmUnOUIm2OJK6WVaE+1KtdYZtW6YkSsFVD37visrqZTJrvZn+l+VLCy59 X-Received: by 2002:a54:4895:: with SMTP id r21mr2628797oic.107.1578668830662; Fri, 10 Jan 2020 07:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578668830; cv=none; d=google.com; s=arc-20160816; b=RjZw7YPWn7Wtlc+xOaMvjSnAuPtZ63kX3zuUiyewvIye7OKQrOaNncdEVej8H8qXEd KNE6c6fPvyfbeHBSEKueKj8KtLRSkxM2p9Vt+q8kFgGsr9tLqjAngarpQUIzYMJhyPN4 LG1gAu2taGO0qA3Ymp/Kz7yVlg6kIWFsspx1dh7hLh/+b+E/9ITlBywYWK4YZ7la+deO JkqDwVb9PVIPG3Ixgb4gMZCis/mgqhXwaVt2HNYNyLa99cFMIM0/3L1l5YoGE2dvy6vJ Gp2NN3/F65loa1j62BtYP2SfI1c98n24jwbfZ4svwVkX66zVsTz7YsdcuelALCJ3Mykt e2OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Si2zczaQ4B24l4I/KMqrXoy/jC0DLGxbZKyOpiSxhFg=; b=GYImz5L1FBC90yWluV3U+E/0yWf0gi5Y8b3Q/k9OE4Abmn5EOpPko6Cees464r1D4G oOZQiGJ4dnUs/CEwuDYDpCT8dpkhdfHZgyEu3kO+sfrB96UiDEusWuLB3hPY1wSJ0l7Z 76iq/ZU9EJYdPAA5QueBirVEuQL8lIdDn3dIrbMsoBDAHTnBESYE5oKdxtTe2xm531YZ 0yEjl9nSGEwwa0cGaVIWFyk1KQNIHtvw6O1yLNQs2Yh1qMsDO6y3xhgmT4EXBKZKPibR UiIKr6/n4rPqSr2qwoRl0PwwCPpFMiRoOFUChBxS1A283sANcHxIDSvfZbTwlsPSVr5f ApmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LB5tR4Kz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w23si1448347otp.109.2020.01.10.07.06.47; Fri, 10 Jan 2020 07:07:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LB5tR4Kz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728427AbgAJPEi (ORCPT + 99 others); Fri, 10 Jan 2020 10:04:38 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:48214 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728174AbgAJPEi (ORCPT ); Fri, 10 Jan 2020 10:04:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578668677; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Si2zczaQ4B24l4I/KMqrXoy/jC0DLGxbZKyOpiSxhFg=; b=LB5tR4Kz+jt9N875hfjHKOjQhD28ys9l8Ts8wx/38ayJZicUZych/Z3fMMmxVLXROskZ4Z HVPChqIZB0KCbQYa1YCyjBJAqIvygugRMmn+8yUhaT+flANa3eHeW7c7mPWvXMystLkfbI ubBl6jXv3sd7ieJ/AixzXvUNhJXP0zo= 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-428-Yuk5rVSHP9W0m6CF3Wsnyg-1; Fri, 10 Jan 2020 10:04:33 -0500 X-MC-Unique: Yuk5rVSHP9W0m6CF3Wsnyg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44E1C107ACC5; Fri, 10 Jan 2020 15:04:31 +0000 (UTC) Received: from krava (ovpn-205-164.brq.redhat.com [10.40.205.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A1535DA32; Fri, 10 Jan 2020 15:04:24 +0000 (UTC) Date: Fri, 10 Jan 2020 16:04:22 +0100 From: Jiri Olsa To: Leo Yan Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Mathieu Poirier , Suzuki K Poulose , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , Ian Rogers , Adrian Hunter , Thomas Gleixner , Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mike Leach Subject: Re: [PATCH v4 1/2] perf parse: Refactor struct perf_evsel_config_term Message-ID: <20200110150422.GH82989@krava> References: <20200108142010.11269-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200108142010.11269-1-leo.yan@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 08, 2020 at 10:20:09PM +0800, Leo Yan wrote: > The struct perf_evsel_config_term::val is a union which contains > multiple variables for corresponding types. This leads the union to > be complex and also causes complex code logic. >=20 > This patch refactors the structure to use two general variables in the > 'val' union: one is 'num' for unsigned 64-bit integer and another is > 'str' for string variable. This can simplify the data structure and > the related code, this also can benefit for possibly extension. >=20 > Signed-off-by: Leo Yan there's some arch code that needs to be changed.. please change other archs as well CC arch/x86/util/intel-pt.o arch/x86/util/intel-pt.c: In function =E2=80=98intel_pt_config_sample_mod= e=E2=80=99: arch/x86/util/intel-pt.c:563:24: error: =E2=80=98union =E2=80=99= has no member named =E2=80=98cfg_chg=E2=80=99 563 | user_bits =3D term->val.cfg_chg; thanks, jirka