Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbcKURNR (ORCPT ); Mon, 21 Nov 2016 12:13:17 -0500 Received: from smtprelay0194.hostedemail.com ([216.40.44.194]:55304 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754446AbcKURNP (ORCPT ); Mon, 21 Nov 2016 12:13:15 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2693:2892:2895:2902:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:5007:6117:6119:6261:7774:7875:7903:9010:10004:10400:10848:10903:10967:11232:11658:11914:12296:12663:12740:12760:13439:13869:14096:14097:14181:14659:14721:21080:21324,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:5,LUA_SUMMARY:none X-HE-Tag: view79_394c1f82cac19 X-Filterd-Recvd-Size: 3344 Date: Mon, 21 Nov 2016 12:13:12 -0500 From: Steven Rostedt To: Josef Bacik Cc: , Subject: Re: [PATCH 00/11] trace-cmd: make libtracecmd a linkable object Message-ID: <20161121121312.6e5a2169@gandalf.local.home> In-Reply-To: <1448053053-24188-1-git-send-email-jbacik@fb.com> References: <1448053053-24188-1-git-send-email-jbacik@fb.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2481 Lines: 44 On Fri, 20 Nov 2015 15:57:22 -0500 Josef Bacik wrote: > We use trace-cmd pretty extensively inside of Facebook for various things, such > as live gathering of statistics. Currently this involves launching trace-cmd to > record data and then processing the information afterwards. This makes > collection kind of a pain and doesn't allow us to catch longterm trends. What > we really want to do is use the trace stream infrastructure to do live > collection of events without having to use disk space and rely on the recorder > to not crash. > > The other problem we have is that any time we want to create a new tool we > basically have to add it to our build of trace-cmd and deploy an entirely new > trace-cmd package. This is not super great as we want to keep the amount of > modifications to the core trace-cmd tool to a minimum and would rather just > write our tools on the outside and link against libtracecmd. > > Enter these patches. libtracecmd is already created to be linked against by the > internal trace-cmd tools, but isn't actually able to be linked against because > of various internal dependancies. These patches take a pass at killing some of > these interdependancies and adding global functions for external tools to link > against. I have ported one of our tools over to link against this library and > it works well. If it would help I can post the tool as well as an example. > > I made the explicit decision to do as little as possible when decoupling some of > the internal dependancies. Specifically libtracecmd pulls in trace-record, and > that is where the bulk of the thread management stuff is for trace-stream as > well as the buffer_instance and event enablement code. It got pretty hairy > trying to tease all of these bits out into their own things so instead I just > pulled out the dependancies on trace-profile and trace-read so that libtracecmd > didn't end up looking exactly like trace-cmd. Thanks, > I know this is a year old (it's been on my todo list for some time :-/). Have you updated these at all? I'm going to pull in what I can, but will be making some changes. For one, since trace-cmd is GPL and libtracecmd is LGPL, I can't merge in all functions easily without going through proper licensing auditing. I'll look at what you did, and try to do the "hairy" stuff to make the library pretty much stand alone and not all trace-cmd. Specifically, it will remain LGPL and trace-cmd GPL. -- Steve