From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793AbeASKhV (ORCPT ); Fri, 19 Jan 2018 05:37:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39632 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753808AbeASKhP (ORCPT ); Fri, 19 Jan 2018 05:37:15 -0500 Date: Fri, 19 Jan 2018 11:37:13 +0100 From: Jiri Olsa To: Steven Rostedt Cc: Namhyung Kim , Jiri Olsa , Arnaldo Carvalho de Melo , lkml , David Ahern , Ingo Molnar , Peter Zijlstra Subject: Re: [RFC 0/4] tools lib traceevent: Install fixes Message-ID: <20180119103713.GB20115@krava> References: <1470073292-18114-1-git-send-email-jolsa@kernel.org> <20160802031055.GB25068@danjae.aot.lge.com> <20160802093134.GB2036@krava> <20160802094823.4a58b42f@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160802094823.4a58b42f@gandalf.local.home> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 02, 2016 at 09:48:23AM -0400, Steven Rostedt wrote: > On Tue, 2 Aug 2016 11:31:34 +0200 > Jiri Olsa wrote: > > > On Tue, Aug 02, 2016 at 12:10:55PM +0900, Namhyung Kim wrote: > > > On Mon, Aug 01, 2016 at 07:41:28PM +0200, Jiri Olsa wrote: > > > > hi, > > > > sending traceevent changes to make this lib installable > > > > under rpm spec. > > > > > > > > Basically adding support to: > > > > - install header files > > > > - install version links > > > > > > > > Having this patchset applied over the fedora source, > > > > I could built following rpms: > > > > > > > > kernel-tools-libs > > > > kernel-tools-libs-devel > > > > > > > > with added libtraceevent stuff: > > > > > > > > $ rpm -ql kernel-tools-libs > > > > /usr/lib64/libcpupower.so.0 > > > > /usr/lib64/libcpupower.so.0.0.0 > > > > /usr/lib64/libtraceevent.so.1 > > > > /usr/lib64/libtraceevent.so.1.1.0 > > > > > > > > $ rpm -ql kernel-tools-libs-devel > > > > /usr/include/cpufreq.h > > > > /usr/include/traceevent > > > > /usr/include/traceevent/event-parse.h > > > > /usr/include/traceevent/event-utils.h > > > > /usr/include/traceevent/kbuffer.h > > > > /usr/lib64/libcpupower.so > > > > /usr/lib64/libtraceevent.a > > > > /usr/lib64/libtraceevent.so > > > > > > > > and could build following ex.c outside the kernel tree: > > > > > > > > $ cat ex.c > > > > #include > > > > > > > > int main(void) > > > > { > > > > struct pevent *pevent = pevent_alloc(); > > > > printf("krava %p\n", pevent); > > > > return 0; > > > > } > > > > $ gcc -o ex ex.c -ltraceevent -ldl > > > > $ ./ex > > > > krava 0x10c6010 > > > > $ > > > > > > On my system, building ex.c with libtraceevent failed: > > > > > > $ gcc -I ~/.local/include/ ex.c -L ~/.local/lib64 -ltraceevent -ldl > > > /home/namhyung/.local/lib64/libtraceevent.so: undefined reference to `str_error_r' > > > collect2: error: ld returned 1 exit status > > > > > > > > > Also I think it'd be better for libtraceevent has dependency to libdl > > > explicitly so that we can get rid of -ldl at the end. > > > > agreed, I'll queue your patch if v2 is needed > > > > BTW, before we start making this ready for their own libraries, I'd > like to make some changes with the naming convention. Mainly with > event_format and format_field. > > Perhaps we should change them to pevent_event and pevent_field? hi, I checked on this one and was surprised last email is from 2016 ;-) so we did not move much with this.. is there still will to do that? I think we were kind of waiting for the namespace changes in traceevent library.. like to have some common prefix for public functions/struct, like 'traceevent_' ? thoughts? thanks, jirka