Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp29641pxj; Thu, 10 Jun 2021 13:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfNFQQh7HZfQmLzYgeuaSwQI3e5t/Iopp9QPDdv9MVZv9iB08zbIJk2kHVvGI4tH8MjJ04 X-Received: by 2002:a05:6402:26d3:: with SMTP id x19mr389923edd.234.1623358327979; Thu, 10 Jun 2021 13:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623358327; cv=none; d=google.com; s=arc-20160816; b=bJ7tHXnrMEjPEj6WeGJxYOxYNJ5HtDDLWtGVS2CbNGesJ8cKJSnkt0mkayA/GIR+Jw 4dRkXMG30S2MZQb1TzQpqG7Rdw/EdeqA7EV9wWHEc38oFhmhKXPdfUv1uAl/71qRA2yk Ulgf68OjOYaTMYLj346TrKTsPa7qwGmeDNZ2yLZlUaSNgNcM7X/bts8pWk+Hyxd7iNYz ujtBhPzVebdjbzz+JpY/zvv/TQWdgj4grSeDtZyyvURrPQg/Cag/g3E4WKhclQVIQBbO KTwuCPdopupofppLZAT3R/ZXNqHnY5ZZXcJngerQbv30qri2V2XNwDLsmgKzhz+66fhY EQ/A== 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=Sm+EodhIsFN4o5SQoatoiFjJ9gwBumKEi+RXKBSe9pk=; b=O0JkrZzCxOlrFt4kMraD74XCxfLG4pTq7V9OW6alVaFbhoXpRaYh3ijDu3bLKODTeK +e+q3sQ5e2/kMCFNk/S2ZoGkw0BBby1qtlw1h4mH5levLOpCDYqU2x+CUAWi0tjMJMyu qgN6Sr5eUyP3y3t0+nJWBX7U8k82Dzv/lCspex6RiGIr/HDilCV9f46oXjr0uRIaFSRh 9nKhJvp2qjY0gTtfhqtuWdv3dO0c5a/0r6zNj0yuMC4iygNHaBBq2JdMQtOBROM1QK1L mBhYCdxnzqc0J2+mgJCr6CbPkx+H66Ic3+76uoX6iW0r9C3eST5zS1njJhKd9lkZrCte NK7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=THiAFxlL; 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 p10si3059153ejo.39.2021.06.10.13.51.43; Thu, 10 Jun 2021 13:52:07 -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=THiAFxlL; 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 S229941AbhFJUtt (ORCPT + 99 others); Thu, 10 Jun 2021 16:49:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51115 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbhFJUts (ORCPT ); Thu, 10 Jun 2021 16:49:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623358071; 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=Sm+EodhIsFN4o5SQoatoiFjJ9gwBumKEi+RXKBSe9pk=; b=THiAFxlLvynb3ipz3ceIi+J9keGs87p2ez78xVn7cgFb/boqQVSSxhJVILTxfaX3D7vrl4 8hBjtzNU8PWoVTblLHg3f9c/cP3gTY3F5vvGXcdv93Nugj8wBrNO8cLHrg6Ehll8MfMbb/ P94Xf0stx9QvmJD+yx/2pGl2dgTu5zk= 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-498-MiyXG1o_NDOV8iQ_ILlPXA-1; Thu, 10 Jun 2021 16:47:50 -0400 X-MC-Unique: MiyXG1o_NDOV8iQ_ILlPXA-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 ED2511084F44; Thu, 10 Jun 2021 20:47:48 +0000 (UTC) Received: from krava (unknown [10.40.195.165]) by smtp.corp.redhat.com (Postfix) with SMTP id B05B95D9C6; Thu, 10 Jun 2021 20:47:42 +0000 (UTC) Date: Thu, 10 Jun 2021 22:47:41 +0200 From: Jiri Olsa To: Steven Rostedt Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-users@vger.kernel.org, Tzvetomir Stoyanov , eranian@google.com, Michael Petlan Subject: Re: [RFC PATCH] libtraceevent: Increase libtraceevent logging when verbose Message-ID: References: <20210610060643.595673-1-irogers@google.com> <20210610103927.44462e35@oasis.local.home> <20210610155915.20a252d3@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210610155915.20a252d3@oasis.local.home> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 03:59:15PM -0400, Steven Rostedt wrote: > On Thu, 10 Jun 2021 21:08:32 +0200 > Jiri Olsa wrote: > > > Michael did the libtraceevent detection and dynamic linking support: > > https://lore.kernel.org/linux-perf-users/20210428092023.4009-1-mpetlan@redhat.com/ > > > > I think we should have that in Fedora/RHEL rpms already, or it's on the way. > > > > The detection code could be change to contain things we need. > > Or it can also be changed to export the version too? > > LIBTRACEEVENT_VERSION = $(shell pkg-config --modversion libtraceevent | perl -e '$ver=<>; @v=split /,/,$ver; printf "%d\n", $v[0] * 255 * 255 | $v[1] * 255 | $v[2];') > > -DLIBTRACEFS_VERSION=$(LIBTRACEEVENT_VERSION) so the feature detection just gives out on/off answers, but we can easily put above to perf's makefile jirka > > Then in C have: > > #define VERSION(a,b,c) ((a)*255*255|(b)*255|(c)) > > #if LIBTRACEEVENT_VERSION >= VERSION(1,2,3) > > To test if the libtraceevent feature is available? > > -- Steve >