From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 74EA568713; Sat, 30 Jan 2021 21:53:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 74EA568713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612032786; bh=flDxFuHnzaxNCYndkuMwykgQul7CKrN4yXB7K8+qGkc=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=WaxG/AwL12Ek1565HLJSCAeUlBvTgAJmQ4loXcmA2w3xy9urEqBj1lnOUl9LaoTx/ 1qYnP1oKkoHLbADC0iMOz0LOOsFiQoqD/n9zwKEDtLwCHVV6KMuOYKtbuQR8vG7/bA cq+NAxauazTr4EhgsjEdI7iUmZIwBDCPaegWTyho= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 489A86C7D2 for ; Sat, 30 Jan 2021 21:53:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 489A86C7D2 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l5vMm-0002bW-Kl; Sat, 30 Jan 2021 21:53:05 +0300 To: Cyrill Gorcunov Cc: tml References: <20210118203556.281700-1-gorcunov@gmail.com> <20210118203556.281700-4-gorcunov@gmail.com> <03fe6138-05d8-a88d-eae5-05d060b54f7a@tarantool.org> <20210124223256.GD2174@grain> Message-ID: Date: Sat, 30 Jan 2021 19:53:03 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210124223256.GD2174@grain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CD238BCF93DF237168F57FB2D6D655B83182A05F538085040A60399DF24FD833D0E5561FA1B83C618A620264EB6E3905C43B83244EEE9617F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70D278D70F8433719EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C8BD49B17AF1FC7C8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCE311601C3C2B550FE37FE4A295393C5DB73DA36C7EEF26D5389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B636DA1BED736F9328CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCD5DDBEEAE3B12F1775ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E735CE5475246E174218B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DBE5FF2EAB69DB47CC574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A50909CD9CFB926361FA262B0BE510EDB1AFE27E192A50B393D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3482189E76C6218D8FA0A25DB5EA54AE9106FF827F0FD2557DECBACBCE9763055875C04CA76BC1174E1D7E09C32AA3244CC127D0A59DDF3E79505FE5F142AE047A250262A5EE9971B0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojBjC2XHTqRV3QDDrqVqBtCw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822A09782BD583CEBD80F4F97509EBD42ED3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v12 3/8] module_cache: improve naming X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! On 24.01.2021 23:32, Cyrill Gorcunov wrote: > On Sun, Jan 24, 2021 at 05:27:12PM +0100, Vladislav Shpilevoy wrote: >> Thanks for the patch! >> >> Very dubious commit. To me the old and new names look the same. >> 'func_name' was even better than 'func_name_desc'. At least >> because it was shorter, and 'desc' does not add any more meaning. >> >> On 18.01.2021 21:35, Cyrill Gorcunov via Tarantool-patches wrote: >>> - rename func_name to func_name_desc because >>> it is not just a name but rather a name descriptor >>> which includes symbol address >> >> I don't see any address in it. Only name tokens. > > struct func_name_desc { > /** > * Null-terminated symbol name, e.g. > * "func" for "mod.submod.func". > */ > ---> const char *sym; > /** > * Package name, e.g. "mod.submod" for > * "mod.submod.func". > */ > const char *package; > /** > * A pointer to the last character in ->package + 1. > */ > const char *package_end; > }; > > I marked the address. You said "symbol address". But it is not a symbol address. It is an address pointing at a part of the name string. Not at the actual symbol, which you need to load later. > The structure is not a function name > but consists of two parts - package path and function name > itself and maybe something new will be added in future. In this case 'name desc' is also invalid - it does not describe the name. Because there is also a path which is not a part of the name. It would be more correct to call it func_path then. > So func_name is suitable for plain names but not for strings > where some part of it has a special meaning with hidden > extension inside, hereby a descriptor. In this case you didn't really change it - it was about function name and stayed about function name. It should be func_path then. If you really want to rename. > And don't forget > about grepability, without this name change grep returns > a number of irrelevant results. This struct is defined and used in a single file. It is not that hard to find it here. Especially if you use some smarter tools. For instance, I use full text search in Sublime, and have never had any issues with finding anything in Tarantool sources. Plus for structs and functions you usually want to use ctags (Sublime also generates these tags). Maybe it is only hard when you use command line and bare grep.