From patchwork Thu Aug 29 16:05:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96719 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 5929F3860778 for ; Thu, 29 Aug 2024 16:05:50 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 501BE3858402 for ; Thu, 29 Aug 2024 16:05:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 501BE3858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 501BE3858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724947546; cv=none; b=xuQOAqbFT0hkMPemaV5CHibm3ot+mHJ6CXa98qSlmQcQdLKWD8rx7wXAUHnuj0+0LT1QF7TWSPgQuAP6x5oxwuZTIc9SeGv4K2I2NolpAn1Ortvrap7QwCeR+H0JfqS0sGZaEGvDyTWbjeNeRlaZEw15vilkP9WLkfK8EmEQohk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724947546; c=relaxed/simple; bh=pbUbLA/U6D+tjh+7YzwDe0SKJdOpiEzsgaT0qd79veY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=oMcKhMAWqETDbuqZiuMmOTOMlNF4QLsm9Rdovwga6z1q40lGgx9L/4d8CjB246M3jK5vLwFrudhkGleNV83aRByPoB3T6nrD9ZtcMAPDVr8L7Z1JmnpUVDtI/Z8/N9aadoKlZDdYvrxQXDt4uFYz+jfwTsKm+BRL++KSXlh4acU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724947545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=76I6bLND6lxTu+dYNZ9tKiZ+oQibG8jqc4cDu2WDfOQ=; b=dehX1YVTAZEFjdhdeUuo2gg5j4mVAU58Ea/n8i7MZyhk/Tkv3iah5qbo9HugUHtYhHfK6l GaxM73MXJ5gBKIdV0HUmXrpSiI9rLZEEPQW5Qyr0TrBJjH+3pqU+ld7v4oAGRq9ARCPFcL RsDaj3KD9ar/DYr1pvApjZnuZ72uq3I= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-220-DkLlmyrCPbGge6fMJDjtJA-1; Thu, 29 Aug 2024 12:05:44 -0400 X-MC-Unique: DkLlmyrCPbGge6fMJDjtJA-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7a8065ac73dso93539185a.2 for ; Thu, 29 Aug 2024 09:05:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724947543; x=1725552343; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=76I6bLND6lxTu+dYNZ9tKiZ+oQibG8jqc4cDu2WDfOQ=; b=rVnCU1wUNecJFsnFfE0KuClMu74dTVypFC63cSqAXzCoR+csQn3oPcFBhVetadsUNn Jwmt1/tXipXIoeAhkgiK53xBnzPrkrjz9FBtSCdKYR41GrPuKDR12aFiMvogrdzPCi9U gD+FSxBi1xDQvoD5L80Ww5rG0ptbIfNrfH7t3Z/O9l0t5dszYpPb3HKzF2zOdr1nxuT7 BNxFA3DAizyliRPxLdiySh3FPblNSSjDfEjEYd0KUfyQ6d/gQGicLBZAnJQ2ni7lUwe+ hxDTgX0u8bUCcUzWqilXX7zLW2z4HmIamMpOkoyQ2KBljo6TfPVRsK5fJ4YaWqEHv8U5 Gj+g== X-Gm-Message-State: AOJu0YznNed37cW2MlRYOPro9A3wXFYnCTWbzyDrNKGwOVAANAxXpMmK TwHTrPknSsy6L9qg2+HkN5QUfq+XVe4zqq9bsSZySDBRcDGxdn6oiLGXIW7yPBd5zDX4guto7RZ qrTlr49bP8IE2x8txZ7XOukfDYQoLwqQkMHojXwNUA4jNKMxgwqblQDnaEsLaXdW55A== X-Received: by 2002:a05:620a:40c9:b0:79f:197d:fe8b with SMTP id af79cd13be357-7a804272b2cmr366613685a.67.1724947543022; Thu, 29 Aug 2024 09:05:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeUGl3aU5IF524Vk8TatbPveWc8hRUWaj/SaXPA0wTlFRZOCRV555ut4DvjlvvsGdvOwUHXw== X-Received: by 2002:a05:620a:40c9:b0:79f:197d:fe8b with SMTP id af79cd13be357-7a804272b2cmr366610685a.67.1724947542517; Thu, 29 Aug 2024 09:05:42 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a806d5e147sm62692685a.112.2024.08.29.09.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 09:05:42 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 9E96C503C602; Thu, 29 Aug 2024 18:05:40 +0200 (CEST) From: Dodji Seketeli To: dodji@redhat.com Cc: libabigail@sourceware.org Subject: [PATCH 16/27] tools-utils: Improve logging while reading a Linux kernel Organization: Me, myself and I References: <20240829154711.1883174-1-dodji@redhat.com> X-Operating-System: AlmaLinux 9.4 X-URL: http://www.seketeli.net/~dodji Date: Thu, 29 Aug 2024 18:05:40 +0200 In-Reply-To: <20240829154711.1883174-1-dodji@redhat.com> (dodji@redhat.com's message of "Thu, 29 Aug 2024 17:46:29 +0200") Message-ID: <87cylrl3fv.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, This patch improves time logging while reading a Linux kernel, to help see where time is spent. * src/abg-tools-utils.cc (load_vmlinux_corpus) (build_corpus_group_from_kernel_dist_under): Improve time logging. Signed-off-by: Dodji Seketeli --- src/abg-tools-utils.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc index c42073cb..9660fcfc 100644 --- a/src/abg-tools-utils.cc +++ b/src/abg-tools-utils.cc @@ -3028,7 +3028,7 @@ load_vmlinux_corpus(elf_based_reader_sptr rdr, if (verbose) std::cerr << vmlinux - << " reading DONE:" + << " reading DONE in:" << t << "\n"; if (group->is_empty()) @@ -3046,7 +3046,7 @@ load_vmlinux_corpus(elf_based_reader_sptr rdr, << *m << "' (" << cur_module_index << "/" << total_nb_modules - << ") ... " << std::flush; + << ") ...\n" << std::flush; rdr->initialize(*m, di_roots, /*read_all_types=*/false, @@ -3061,10 +3061,10 @@ load_vmlinux_corpus(elf_based_reader_sptr rdr, rdr->read_and_add_corpus_to_group(*group, status); t.stop(); if (verbose) - std::cerr << "module '" - << *m - << "' reading DONE: " - << t << "\n"; + std::cerr << "Module reading DONE in: " + << t << " for '" << *m + << "' (" << cur_module_index << "/" << total_nb_modules << ")" + << "'\n"; } } @@ -3125,7 +3125,7 @@ build_corpus_group_from_kernel_dist_under(const string& root, << root << "' with vmlinux path: '" << vmlinux_path - << "' ... " << std::flush; + << "' ... \n" << std::flush; timer t; @@ -3135,7 +3135,7 @@ build_corpus_group_from_kernel_dist_under(const string& root, t.stop(); if (verbose) - std::cerr << "DONE: " << t << "\n"; + std::cerr << "Kernel tree binary paths analysis DONE in: " << t << "\n"; if (got_binary_paths) {