Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755028AbcKUUnv (ORCPT ); Mon, 21 Nov 2016 15:43:51 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:58269 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754980AbcKUUns (ORCPT ); Mon, 21 Nov 2016 15:43:48 -0500 Subject: Re: [PATCH 00/11] trace-cmd: make libtracecmd a linkable object To: Steven Rostedt References: <1448053053-24188-1-git-send-email-jbacik@fb.com> <20161121121312.6e5a2169@gandalf.local.home> CC: , From: Josef Bacik Message-ID: <4f615915-7748-0ff7-4771-a1fca447d551@fb.com> Date: Mon, 21 Nov 2016 15:06:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20161121121312.6e5a2169@gandalf.local.home> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c091:180::4e26] X-ClientProxiedBy: BN6PR2001CA0012.namprd20.prod.outlook.com (10.172.112.150) To DM5PR15MB1324.namprd15.prod.outlook.com (10.173.210.14) X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1324;2:RS03DYkjfN10bdmj8evgpNM3lJDmtv28NdUXDfKO7ML0TWSmx/qs/47sc4+/fdSDni7ZH97fq4s6K4pAJ3s9Wq0ReWLgrb9hLB4NIZCNSpzqcPlpeHMY09IFFNiTfEbIlfhYRYpOJ6OQddhzMnbBdDIAGLkMPLO5xN84YOLpepo=;3:1+/dkQBWBcpZIQO/61fuMxpU10e3JkO8b7W3nmEIJ0HlcF5HXa/GFE0zEbcKg/tpQLHK1txk8USe7P8LNSrI2UTU7U6zvaDOxF6S6N50rGBCATBZMPrldHbpRDg/owxLyDv3vNUoAuodd7OAr1cruQmHdAbnSaXJHXsntJGeu7c= X-MS-Office365-Filtering-Correlation-Id: 8439cb71-1230-44cd-0348-08d41249e262 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR15MB1324; X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1324;25:AsUydd5es/KmiUXCfQSJgd54oo5TOHETf7i+n+Yqogd8xD/QfTlWNExqPYpbSwc8WPW3rbgEtKyPTHprQ4EcwvfDEN2Fy+0otpimzCIcrzed8cF2v2KkTA57H8MpeZqocVxTwFVxA2xhnW73dfR2Ce78xr+e9Y0EaBcuhls7V46FCgfbWJqZPyzqnzGOJbekg9+D+imIlKrJ7qcLRCQZX4h8LnOBbDY85V1lG8YYEbUDwgpm/+Wuu7W+OJ4CeCBVCbU2Vj712i09Nr5yhXHLA2sR6c1QcZXacb3bA9Gg9yFvMOlfXcXDLVNe45Ah7bLLS/usBq3vN71Hit8hK8PqUHshwlrL2GShRx/NHMmKFGU0AAsW76tLXjcXm7YLNu1vdaKnMMjVZgrlk6gbfdoaU6BKOBaS60XIlDpKQoYgy7YZ+KMB8CDYDJeOWddOxv6tvqpHLCBJImIM4LMf8uqMFuVJt/HfoVn9mwgahIoXWTHuqyuQraUK17DxAM3CjZLw224NyXHlzUyQbYuvqPiwviyof7ZYVcJW7RSWRzKd62r87SAh+4CZXViPd2Qy+I9WdmrvJz9wNg3rzHXH1EB6jx9E9nNUNS/c48LGJ+Gvv6O0TwMgiXgJFsufkM83rajwFw+qSLbUtLNlQojkmrknOOX7m83tE4tWc2fE3GOvXU/phqrrZLjjjvPUPU8JIwK9qjHSLAV5DDMnMNs6hIjbCRneClsEUqUMtG5Iqnz9f647qOCRBruT9fWMayjy1ak7qZMa0mHAvSsttzd0Cc0t2w== X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1324;31:9ZI4U1IEIkz5AhXwsPCGbO8uMOSubZGxBACU5g+wOQSX/DE8e5k7p7fCsaxnfbxwux82oXBfOwkBwzb46bpG+SEPSM3APemhoJxmeSSHjNZoSEnWQNHyWa271ZsTR9gcFzJQcfWoZwKbaH9hO/Ww3VLqPrmQaF04xFXeRBnJ3Y4LP4UiNi1B+DD7ik8RZZ10htN3zfah136dV/Z8Kv7Hgm56YMV1jF9tdkPaRP2Hpn654QdJrAbggScFTxMg+PwC+LncNmin66W5OUflleFEXQ==;20:sL3HLY65C5J6UdJ10zvE55WZdblw+F+9poj9/RRPOgHjj55V0D/ZErg04BVNroN9bienK1KTYMBMuFBaUCzuJYSFSmO2hU/y8KQxWJxXyLUZSQJzfJGa2c73oubq7JN0hM7En/hFsa33txS/0fIndHK2lC/DG1XPCVi6t0tppmdiCsmbkFvQFC6KmQ7lOSc0PjUHKUbK9rVmnRuxLO/YQdbOwNoX5a2obQEswqkCh9jNQQ+DutrCndxK7+s/gcrc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(81227570615382)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(6040307)(6045199)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(6061324)(6072148)(6042181);SRVR:DM5PR15MB1324;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1324; X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1324;4:k9en02O5CCP3ZJcv5RShut116z7t/S0ZwKyjOLNYKGWI8/YJtN7VBt/dt5JW0ccagHjX7KOEYlpvUfEPsO4YvH1+Gms9PRz13jboMN7iuR69zwNkG+ekWtkJMDOuRkRIR87QjHawZ6VXgj5+fV/y6EEqfVZwatRojBWQTRpU0leVpo3Z15CW0dyD/mQjamLw05YXTH7AYO0eSfyS59xRME2TMD2UzOLbiTCpbNGmWaWu6+Q+Pw22Sfa65jquB1j2qGLWFEGuUK5BMlK1kbk0L4a2uLZ+nANHUDBgjpaOvz1xqwZRDvnKzIDS4oJti8PucWpbBgdrd/G+rdrv5hoJ6ZxcJPzh3ifj8iINKbHtqi4Cu5N3r2INCMb7L9mHZaEKxg53brSOHrkdAzGUqnDHVdHQ/Ux5QgMwwFB03Ly5vUAoYObvfCb09KeiUrRsIbzVcDCb5krvoI//tu6XZWiIePOnP32KxzSLNxn40C7QrbrYd45OtPm4vPUOF8zR431a7RellcvBQIKXFKLZxBTpeSue2XA70Cg0Q62tFRtPnvOPw9HMOFph3QRk/h5naZzzCT2UkbxDgC4jcMfH4wPolIyA624/aV5l76jFRIQnnxH+SGW9ehOGrbP3exdjTCX9 X-Forefront-PRVS: 01334458E5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(377454003)(189002)(24454002)(199003)(23746002)(81156014)(81166006)(105586002)(106356001)(7846002)(7736002)(229853002)(6916009)(31686004)(2950100002)(110136003)(42186005)(50986999)(101416001)(4326007)(54356999)(36756003)(76176999)(305945005)(65826007)(6666003)(65956001)(64126003)(4001350100001)(97736004)(68736007)(83506001)(2906002)(50466002)(8676002)(38730400001)(47776003)(92566002)(189998001)(86362001)(65806001)(6116002)(77096005)(31696002)(33646002)(230700001)(5660300001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR15MB1324;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM5PR15MB1324;23:NV8D+YAMBOlTXhbxGWEzVs3VlEdpHIt9Qb/32?= =?Windows-1252?Q?Porr+Ouso5dr/XiFpC9E09rjpOXkbuRrfE+0t/nquWMUxUipocQ/j8sU?= =?Windows-1252?Q?CBQtMEtFWweb8YUk2uyLU7poyRaCqHaUY4X/fbP19LxTzhgL0km8x1f0?= =?Windows-1252?Q?ZrATFW7b7+ypWr7Z9O+dDInMUdq/q24wzj34Xro+8h/qF38sntbwDV51?= =?Windows-1252?Q?Way1VC9F8R78GOZSxWFLEBnaRd72eFCTKLLbC5uFWek2/8g09WYXmdzA?= =?Windows-1252?Q?42OpXOlwRlkr9Lv4/ZHSK+nNogSU3aO5LbCDYFepsSIkNbMuTy+FTE4M?= =?Windows-1252?Q?8/7mp/2V2XhxzU0zS6MEnAuoZGACi0m8+6AstduY1Rd5E3ZmnJdRVUUM?= =?Windows-1252?Q?ewouSlX5kg/VHpbmwJhHLH1KRU+mE+WwJQWDHKdcum95oOiWnoHIqIwK?= =?Windows-1252?Q?TvaNDNcvdOj2gX9Z2WDKTGZDagqVopM07EJcCO8QS8xq6QBdoaDTpjAU?= =?Windows-1252?Q?uetzAnac9q7EconMUeCMljoPNI3QVdxi5tzXgUEe1qOVpehEUBiYO2lM?= =?Windows-1252?Q?p7/d1pSvwqwws7WHPHQmrbOt89HqBBFVZneOSCGDzx3ZYu3RKyFurLTQ?= =?Windows-1252?Q?PbfwFuLKllgAtZG32OixpwA6QXPZzVorUOwheiFbvvQWHQ7iiWkRHGXT?= =?Windows-1252?Q?dQkNtSoizt6B1JSzsnlSWWzwVCF2peeLUZd91xl+knltjuzP4++UTyXs?= =?Windows-1252?Q?CGsPCT+vvg6xx5g93MujpTNMZzqbZYtOLCU6vwNCfrOui7/5+JjKp9n7?= =?Windows-1252?Q?54sr21feFcA6ctRTM1h9h5XpdNQvjKCe45ErwZCHGclMblscZVNTpgBK?= =?Windows-1252?Q?LZkRjRpiy0MA7ItT78SIrf2XaUDGwdYPv/4aRRyv3/WZEgt1/SRCgHBY?= =?Windows-1252?Q?ITFHfwKyir7M54Em+K3lXfe5PqfNymb5qclu4Vmc6qG8N6NbPI78pSko?= =?Windows-1252?Q?hwXFgRm2+iucwhSS8fLUBq8Mf6TuDRX+VVfrvFpUJdYKBoGOK4UO9Iyp?= =?Windows-1252?Q?noJaJS9v92R6muT1TUcY9FHuiPNuuwfbblKNURDbRkimfTU8U8SxZInt?= =?Windows-1252?Q?H2rne/4vKphzed6Ld8u/TwJ6CT8WiuHpZU7nF5Nwtd3RNWy+gh2KF4PN?= =?Windows-1252?Q?MVUA9fXiFuE6ehUAcAMDhj+dQs0BaGemjGgb/lqkDKYfx/zj+nv58Y08?= =?Windows-1252?Q?yZSpdh+92fxSlaKkjqR/Hy8H7VTSgUOGEZjpyFIhXyILl9fZiT4V0GDQ?= =?Windows-1252?Q?W9nao6801iBOtirN+7u+42eFyJrKnkAt02n6NNOD5Qf+AxoAgeX5uqmW?= =?Windows-1252?Q?0SVwvQ6w0BI?= X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1324;6:9gM2le+sbe5OK2uRLKQbbPR/EpPhWqJUVWNC0V/3FFKqkiVef0RV5XrR38Yt4jzs0maua9meii2n/ajZzU9co8xPIdLN0okOgzq9q24a3aDlFwdUWIQhTRKLn9Za6zeT7paMFTTPGf1SMYJE1EGv6MYXaqotZ7q4k6/0IEvQe1xmaM10atTqYmcO/bqWGacktKymPS59VglfUm7xEPCiBhLZ9pdmvZeVtSsOR2+xaLP8NmWNSp10xht5DW8DlS000vEDt2Wcv5NbAQPsI0+M2zEJz/aTNUs4P6fmpMWIRzWCOxxmFZVPd0/AfxIFi/teD3gCosWihk8wxalUgBqqNh/PaGEluObjpYDVbWNfcZM=;5:gsNSiRIj6k06paorP6ETy5eeLSaTRvKUNZwMY1aQ01VyvvsBvTCnYgva+Q0eKm6Wr4OvebMoVt4goIor379JFf1qoDlVVwCwBHt3i7rvVYj6qlS9iavm5zS5u5+Pf6KbpklijmfXhvbZmiq5zagfRg==;24:M0fiCzVZDepoZ1OYF+LRn2leCzQZ09K7CgEojP1ONVyqHDxxoOhNWrsFRAKHEGNW/a2e0KT8Bqk3BFJd+PNO8djXKiCvstoJ99j2VVHUftA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1324;7:Vy5SCeWukpEfuTf61/Gnbb6P+zatCVZ8x6F1er3TuD5Ica58McRHmMdIT3KfoCEUAFVfDpvrcxOYIATomm3Yj90znvCTwvK1+vBSHpwKW2pYBFH2Vh6rCm1GMoDcU3eSWKta6ofwfi/qHd4W9SeddN3adFeGJj8pU/9ZPP7nDZSr6QjzeWS7Q3ElUID5BEFoVn/VMibS9M6VgJwuTou9DfGMD2gWHvcQqOF4pvidlrxPM42aaLnnwWUX+Jyw9uSFhIiTshypgMeUbZGfJeNQNFY34UyeFtwvDJ5zmTUBwhy0UGJLuheXFo6Q0xMrBQkbNyF+ic7rMLfW6hcirb6xVQ3GEuSppMQf3D50uyqj8ZQ=;20:3ubsCJ6+kUd8VTvQ31T1TfFSsB7hwyVeDZVtIz+dP6tuxiAXXmG3nvDwWPEDw38LoVEJCJ2+sHTjXvQmyKpVZ/ZgYMlUdSRI5/cQC3CY9rsCyQM86HG3rzap904XofTiL7XhBlIeayixQM3UsU3QWNMOCzK9Lcyyks89JWWAGW8= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2016 20:06:30.1305 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1324 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-21_13:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2769 Lines: 50 On 11/21/2016 12:13 PM, Steven Rostedt wrote: > 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. > I haven't updated them since I last posted them. Bpf filled this gap for us so we've abandoned our trace-cmd based tools and just use trace-cmd itself for random debugging instead. Thanks, Josef