From patchwork Wed Apr 27 22:16:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guillermo E. Martinez" X-Patchwork-Id: 53282 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 31B1D3857344 for ; Wed, 27 Apr 2022 22:17:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31B1D3857344 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651097843; bh=ArRCokQ2HmuKdrYNltUud5QKEkViS9+UdrLr4CgxLyg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=dkU7XR0GdHiW3lIFdTiZDpC83onrIkL2L3CYkfgn/lF0eZVaBSa7ra2z+/H+biwPM Va1BTopqUa7M+XcVZijXu/0wxqRhGLE8niOtlNyVCC3DdAXWl4gmb8yhwM11NhRh7J P4XHQU/JcLFJdiYKD/algos8yqFH+OCRhAreYR+M= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 406843858405 for ; Wed, 27 Apr 2022 22:17:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 406843858405 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23RKmb7n018608 for ; Wed, 27 Apr 2022 22:17:16 GMT Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3fmb5k2fhd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 27 Apr 2022 22:17:16 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23RM586c033758 for ; Wed, 27 Apr 2022 22:17:15 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fm7w5m4m1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 27 Apr 2022 22:17:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l/7CSi+epRsWAqE89V4XsskZUrvYMmHrBSqb3MjLZw0bRd6PsBTo/RGrR9eccuN8LRCZvXzsZkrecspnJKBBCoJqFS65wPngrOQG1olUHlqqGtu/tMVpbx2zh/LYpDZNkMRcjE5TVzyRBD0ZCf9rEsyNOlvwNcSTzxFQoE9pmMQvLwRN14Jwq5Cah3EV/LCL6TaiT26TGL5jgrrPUC1ye9qi8hkD/4hTybMYLxWRZDJ3go8vaCT4vXVGmfK1EkLjFokXvMqvZRCnhZps8Xr14HFIYVKuKjxhxU0nxWSp3y/1ZwUXj4otejyemHJlU+52WCuJcJMHUxhtdlg6FLxdTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ArRCokQ2HmuKdrYNltUud5QKEkViS9+UdrLr4CgxLyg=; b=HwGc3jAxRrIFBl+qk/YEx+CI2Qc1rkyqSZgqx38XyyxvoW3Dj/+oscPZ1StSRMFGG87Iq7uJVnSDaoxyBxwVApPQ/h5eREcW6d5YPwa1NwuG/fPPezvAWyFGC05Wznlk/wRgBYkbq27Pnv2nRNH7jDj5ynaKtET5k0f8B7+kpNQ4ttLSeeZx/qWAoHB8SN+3rQtPZQ2oHTxSH7aXVTIVDLJKajKjVm42LFwdnEkvYeCAXYlOzfujMuuyx0BQP0vi+uXPfLI7kwhpNRN/ZOUiAZ368ezKt1x/m/J6RuizP1PZ44qL9CWmXJHMg1u4+3o/KybdAoO01lBBrap0gvWupw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR10MB1407.namprd10.prod.outlook.com (2603:10b6:300:23::20) by CH0PR10MB5323.namprd10.prod.outlook.com (2603:10b6:610:c6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.13; Wed, 27 Apr 2022 22:17:14 +0000 Received: from MWHPR10MB1407.namprd10.prod.outlook.com ([fe80::107d:de35:fa5f:3cc0]) by MWHPR10MB1407.namprd10.prod.outlook.com ([fe80::107d:de35:fa5f:3cc0%7]) with mapi id 15.20.5206.013; Wed, 27 Apr 2022 22:17:14 +0000 To: libabigail@sourceware.org Subject: [PATCH v2] ctf-reader: Improves performance to read CTF information from Linux kernel Date: Wed, 27 Apr 2022 17:16:56 -0500 Message-Id: <20220427221656.2216932-1-guillermo.e.martinez@oracle.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405160833.1179590-1-guillermo.e.martinez@oracle.com> References: <20220405160833.1179590-1-guillermo.e.martinez@oracle.com> X-ClientProxiedBy: BYAPR07CA0060.namprd07.prod.outlook.com (2603:10b6:a03:60::37) To MWHPR10MB1407.namprd10.prod.outlook.com (2603:10b6:300:23::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2877a3f8-7c5b-4db2-4f9c-08da289bae8d X-MS-TrafficTypeDiagnostic: CH0PR10MB5323:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bkLkMOxlzA/sEePQa+vUXKGdapD5O3fikS8h1rAT5UXuPx+XI2Es8S7BrKyesEIJyxKuiZDbYMOYjI1S3seXmQo0bzbDwWc6U0/tt8Yxju95NPJ0olqVe6HpdNfLYPWXU6oY4nCr3Z6y8xc8uVjIrCWvGegdovCGZp+hhpiS3A7Gr45pvjCqbW32I7f2gkIY7mVHEZw1jC0gycYpWuAJKN0yQwecdI5pnO9yEuHJ1p/w1QaM5WK+o0+W3JU98kkQOIsAgfgEf30Qn1FOCV6BM0JEJACfFwlfLpj5qvjm3mMGU5iM0jGv3CqzZ+xOovDUFG9CCrmC0d5ANgVeZdPVvPBRWGg0gycFDstoqtC3rDu9++9xYyi7ti9H1fp9p/J0QU1YRR4EVEMGxQt/gE1tAZ0VRz/ZtbAwToTNzNoSSS3S1Yq8IJCRTs7g6BjaJZN75NzcetX+NuMhznhzcLTnAFXT78PyX3M9ObLMfzhLDeuvs7AREf3g22KDx827qC6YzjwVG6vrvQ4oDV4aCtjIx4Kmg9eeYqTKi/OtUeaziY7r8zruuj7wfMIZLQ9d6/Tm+V7jvS8rbZbmUjkbmnDmOV88olME3Tjt+nPoP+DaRs0HZqlUAz2EVhUmN7Fsg+o+NK6PJ+JRWss5gt7ns43cTg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR10MB1407.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(508600001)(4326008)(66476007)(66556008)(8676002)(86362001)(66946007)(316002)(38100700002)(6486002)(2906002)(6512007)(6916009)(52116002)(6506007)(5660300002)(6666004)(107886003)(1076003)(2616005)(186003)(83380400001)(36756003)(103116003)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: nJVmzC7ev3AsYyJObgu3CI6niRrcH0Wt0S+JFFVC42UybG5rav1VEhxUrINst+9YJgXbke/tvwsyA21vuh+qGyH+IF9tHGQIHaSb5o84lAtt2kyWUSrs3ASjphQEI7H2FqEP46W4ssL48IakajNxNdmnQNZopBvNVKd4GwohjPSIRpVYVRMg6JNRFx7DAjogqJ+n3bRlfpDkFH7A8Sl0iWq/3kXXhY4oIPDASxPvp1dC3wQz6PWC00uSbb3g0k2aNu+bpMiyzZ8zzfVEjEYZE631p2RcNuXv8CF4efoCAOq3Qw5G4ymKw42UgXLrkgV0babHBJLVDxOnBOiUtX6teQOeIk4LP9IIX4WeRp/5EMMlEnu4HxkLF2W0rn7tHBTBymn0xHwgQCdPK1iB0//qQNn+8+20kE/RzpWp2lFX1M0yKouB16pgMTVjmHWmF5ycG/M5qoGnh+LnZNuSTRsHNB3TyTA29sGGrjnw7lTfIoy+Sh0ER4SbHZH6MBTwWfbWpYoXpKlownXzlBf3g/hlCoAlx2IDM29IFZ6HMHW5Apx0+GiqnEhKghoQG7Fdj3XX5QsgMmKOvWz9Udtju85n7D2z0BFyV0rHV2FmCfIw2xkl04gJThYaSYXi4XpDm7sNT2KWQvECS5uxfa8Oe6wFMlQn2viupQDsUZb1jOYV+dleip/Fm71LnB9skbhmzNPudbc5R9UuP6dcVf5mM907ZvrFPj/qZNr6ok/V/dPCJwU25UZi2irqpVg10Xfp3cCorrEGhi+/P95tNTmX5hP6Y8oz84z5x3bDouSz8QNa2XU2IQz7PZwxKw9PmUU0YQHLfagtaikU9+9ndzs+cpL39AiGoTPrvIarRq/agx9kSDR6Oe50bsqz2NHlxtAbpyyVjskIQbzrShAD4XnJw2ocd04Y1fMHmCI6FzsZhyFE/+/DZ1o5hazbsbubTBl9TwZo1FJ2xsa6UvcXyOH6F5Hxydz95bkmC3Hovx32BnVctSo34gYR/hJRu9J2HT7PYEVMiWamXqnKYPZGGDGttFI+ohSx4GSCk9IATqZhx90o77cRT2LOQ5rAQpsIJFhlaLGLIQf1yxfUL2+BjGvXDVJjydMwSFWGzRRWu7JOAc4jtehem9/OrGfBuxcUMBf/wNn373woTZJ4pNbpB+Z1YRiTVJgDUJhAMbcOfPCX8Z8jg2FPw3UyxdgwLDrgChksZTI0KZosT3YM1ciLWF4KBcZdO/ipnvKiu6k1LlQqVQRINO86QadZlluOu6+xM7Qsee+LnhhCaRvyT8HCCECszL8d1C+RSLU5xdr6sTm8XHpXCxpw7S4YcX5TqNjfiBwyxSHtllRwo5jd+3LvesrjWTwg+UgIkDUDE4nFp1goS2idyo2B1WI5WiWaTxWBVBT0PoZiqc9M7xXLqTjmHlmanpUjD1A4hYpX6EiL6eSdYzMQ/dXg/zDG8yMymw3GLICgKCSrGwNGNQwc9MTtlqs46Ib7wf0FuiaAC3Bhqi44VxSstipHp7wy9+/J2p9wI7cIxuKmnoBJOdC/pBZTPIIzlhVDCmEM5EIKTrd4B/7bkYMlEnaDuPIKA/7am021PZ2OVALqNwQmqm48W6ddpK6H89aYnDsZWv1vCEKWXQaEAn5ee7driI6N6c8KXdyU0vFiwlm9gX5mXCy9KC26Yx2Kzbr657vm0qwxpQMI2Jzyzu6egw7lUBwgntgo2pGoTsCIajMX2gIJwQ8K5JcDlstpPj3p6AtWXQSxB1we7pjY9kw6xOLUn8F+xDU+sjBXBXgBLSLJhKq/FM9z X-MS-Exchange-AntiSpam-MessageData-1: cRTcULlvZgWH8Q== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2877a3f8-7c5b-4db2-4f9c-08da289bae8d X-MS-Exchange-CrossTenant-AuthSource: MWHPR10MB1407.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2022 22:17:14.2384 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LjBjFQfxdtvNDwLNKCYpigoV2oS/OVKq2bB+s+FV9jvG9npozdpit3sZMdekYfYK4BxsTvJihG912BHyNZ5sfe8FrsihG2GJ3gIDU5qgQSw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5323 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-04-27_04:2022-04-27, 2022-04-27 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204270132 X-Proofpoint-GUID: -ZRtgzJ3iEfVuxXIX3wsIaDfYVZju_hM X-Proofpoint-ORIG-GUID: -ZRtgzJ3iEfVuxXIX3wsIaDfYVZju_hM X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Guillermo E. Martinez via Libabigail" From: "Guillermo E. Martinez" Reply-To: "Guillermo E. Martinez" Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello libabigail team, This is the v2 patch to improves the performance to extract CTF information from Linux kernel, major changes respect to v1 are: * Initialize `read_context::ctf_ctfa' per group, since it contains the debug information for vmlinux and kernel modules. * Get rid of utilities functions to locate, set and get the vmlinux archive pointer while corpus group is processed. Feedback will be welcomed and appreciated as ever!, Kind Regards, Guillermo The _same_ ctf archive is being open/close several times by vmlinux corpus and for each kernel module belongs to a group, it's hight time consuming during ctf extraction info from Linux kernel. So, this patch improves the performance up to 300% (from ~2m:50s to ~50s), keep open per _group_ `ctf_archive_t' pointer from vmlinux (the main_corpus_from_current_group), since this ctf archive file contains the information for kernel modules as well, then it's reused by each module to be processed in the group, invoking to `reset_read_context' ctf reader function. Doing so, `read_context::ctfa` member should be updated iff corpus origin is `CTF_ORIGIN', otherwise it must contain valid information from the main element in the corpus group, `ctf_close' must be called after processing all group's members, that is in `reader_context' destructor. * include/abg-ctf-reader.h (ctf_reader::set_vmlinux_ctfa_path): Remove declaration. * src/abg-ctf-reader.cc (read_context::read_context): Use member initialization for `ctfa' member. Remove `vmlinux_ctfa_path_'. (read_context::~read_context): Add destructor and delete `ctfa' member. (ctf_reader::set_vmlinux_ctfa_path): Remove definition. (ctf_reader::read_corpus): Adjust `read_context::ctfa' if corpus origin is `LINUX_KERNEL_BINARY_ORIGIN', looking for 'vmlinux.ctfa'. Invoke `process_ctf_archive', `sort_{functions, variables}' if ctf debug info was found. * src/abg-tools-utils.cc: (get_vmlinux_ctfa_path_from_kernel_dist): Remove definition. Signed-off-by: Guillermo E. Martinez --- include/abg-ctf-reader.h | 3 --- src/abg-ctf-reader.cc | 48 +++++++++++++++++++--------------------- src/abg-tools-utils.cc | 40 ++------------------------------- 3 files changed, 25 insertions(+), 66 deletions(-) diff --git a/include/abg-ctf-reader.h b/include/abg-ctf-reader.h index 827d1bc2..ba7289aa 100644 --- a/include/abg-ctf-reader.h +++ b/include/abg-ctf-reader.h @@ -48,9 +48,6 @@ void reset_read_context(read_context_sptr &ctxt, const std::string& elf_path, ir::environment* environment); -void -set_vmlinux_ctfa_path(read_context& ctxt, - const string& filename); std::string dic_type_key(ctf_dict_t *dic, ctf_id_t ctf_type); } // end namespace ctf_reader diff --git a/src/abg-ctf-reader.cc b/src/abg-ctf-reader.cc index 2944be07..cc79520d 100644 --- a/src/abg-ctf-reader.cc +++ b/src/abg-ctf-reader.cc @@ -58,10 +58,6 @@ public: /// be read from the file then this is NULL. ctf_archive_t *ctfa; - /// The name of the vmlinux file from which the CTF archive got - /// extracted. - string vmlinux_ctfa_path_; - /// A map associating CTF type ids with libabigail IR types. This /// is used to reuse already generated types. std::map types_map; @@ -199,7 +195,9 @@ public: /// Constructor. /// /// @param elf_path the path to the ELF file. - read_context(const string& elf_path, ir::environment *env) + read_context(const string& elf_path, ir::environment *env) : + // ctfa data member can be used per courpus group + ctfa(NULL) { initialize(elf_path, env); } @@ -212,11 +210,14 @@ public: elf_handler = NULL; elf_fd = -1; is_elf_exec = false; - ctfa = NULL; - vmlinux_ctfa_path_ = ""; symtab.reset(); cur_corpus_group_.reset(); } + + ~read_context() + { + ctf_close(ctfa); + } }; // end class read_context. /// Forward reference, needed because several of the process_ctf_* @@ -1333,7 +1334,15 @@ read_corpus(read_context *ctxt, elf_reader::status &status) int errp; if (corp->get_origin() == corpus::LINUX_KERNEL_BINARY_ORIGIN) - ctxt->ctfa = ctf_arc_open(ctxt->vmlinux_ctfa_path_.c_str(), &errp); + { + std::string filename; + if (tools_utils::base_name(ctxt->filename, filename) + && filename == "vmlinux") + { + std::string vmlinux_ctfa_path = ctxt->filename + ".ctfa"; + ctxt->ctfa = ctf_arc_open(vmlinux_ctfa_path.c_str(), &errp); + } + } else /* Build the ctfa from the contents of the relevant ELF sections, and process the CTF archive in the read context, if any. @@ -1346,14 +1355,15 @@ read_corpus(read_context *ctxt, elf_reader::status &status) if (ctxt->ctfa == NULL) status = elf_reader::STATUS_DEBUG_INFO_NOT_FOUND; else - process_ctf_archive(ctxt, corp); + { + process_ctf_archive(ctxt, corp); + ctxt->cur_corpus_->sort_functions(); + ctxt->cur_corpus_->sort_variables(); + } ctxt->ir_env->canonicalization_is_done(true); - ctxt->cur_corpus_->sort_functions(); - ctxt->cur_corpus_->sort_variables(); /* Cleanup and return. */ - ctf_close(ctxt->ctfa); close_elf_handler(ctxt); return corp; } @@ -1383,7 +1393,7 @@ set_read_context_corpus_group(read_context& ctxt, { ctxt.cur_corpus_group_ = group; } -// + /// Read a corpus and add it to a given @ref corpus_group. /// /// @param ctxt the reading context to consider. @@ -1436,18 +1446,6 @@ reset_read_context(read_context_sptr &ctxt, ctxt->initialize(elf_path, environment); } -/// Set the @ref filename being assigned to the current read context. -/// -/// @param ctxt the read_context to consider. -/// -/// @param filename the @ref vmlinux CTFA filename to set. -void -set_vmlinux_ctfa_path(read_context& ctxt, - const string& filename) -{ - ctxt.vmlinux_ctfa_path_ = filename; -} - std::string dic_type_key(ctf_dict_t *dic, ctf_id_t ctf_type) { diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc index b73786a8..47a33022 100644 --- a/src/abg-tools-utils.cc +++ b/src/abg-tools-utils.cc @@ -2470,31 +2470,6 @@ get_vmlinux_path_from_kernel_dist(const string& from, return found; } -/// Get the paths of the CTF vmlinux archive under given directory. -/// -/// @param from the directory under which to look for. -/// -/// @param vmlinux_path output parameter. The path of the CTF vmlinux -/// binary that was found. -/// -/// @return true if at least the path to the vmlinux.ctfa binary was found. -#ifdef WITH_CTF -bool -get_vmlinux_ctfa_path_from_kernel_dist(const string& from, - string& vmlinux_ctfa_path) -{ - if (!dir_exists(from)) - return false; - - string dist_root = from; - bool found = false; - if (find_vmlinux_path(dist_root, vmlinux_ctfa_path, "vmlinux.ctfa")) - found = true; - - return found; -} -#endif - /// Get the paths of the vmlinux and kernel module binaries under /// given directory. /// @@ -2576,15 +2551,6 @@ build_corpus_group_from_kernel_dist_under(const string& root, t.start(); bool got_binary_paths = get_binary_paths_from_kernel_dist(root, debug_info_root, vmlinux, modules); -#ifdef WITH_CTF - string vmlinux_ctfa; - if (got_binary_paths && - env->get_debug_format_type() == environment::CTF_FORMAT_TYPE) - { - got_binary_paths = get_vmlinux_ctfa_path_from_kernel_dist(root, vmlinux_ctfa); - ABG_ASSERT(!vmlinux_ctfa.empty()); - } -#endif t.stop(); @@ -2684,12 +2650,11 @@ build_corpus_group_from_kernel_dist_under(const string& root, else if (env->get_debug_format_type() == environment::CTF_FORMAT_TYPE) { ctf_reader::read_context_sptr ctxt; + if (!vmlinux.empty()) { ctxt = - ctf_reader::create_read_context(vmlinux, env.get()); - set_vmlinux_ctfa_path(*ctxt, vmlinux_ctfa); - + ctf_reader::create_read_context(vmlinux, env.get()); group.reset(new corpus_group(env.get(), root)); set_read_context_corpus_group(*ctxt, group); @@ -2725,7 +2690,6 @@ build_corpus_group_from_kernel_dist_under(const string& root, << ") ... " << std::flush; reset_read_context(ctxt, *m, env.get()); - set_vmlinux_ctfa_path(*ctxt, vmlinux_ctfa); set_read_context_corpus_group(*ctxt, group); t.start();