From patchwork Tue Sep 12 13:15:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 56118 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 BDE1838555B7 for ; Tue, 12 Sep 2023 13:15:24 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by sourceware.org (Postfix) with ESMTPS id 396DE3858C50 for ; Tue, 12 Sep 2023 13:15:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 396DE3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-5733d431209so3443442eaf.0 for ; Tue, 12 Sep 2023 06:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694524510; x=1695129310; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Uykv/W6wxrMTR+CetWSygO51PMiqrySD1Wapjvl9gBg=; b=wokNU1GoouUBRFea/GCD9eiKtk51dnQ20UizRfdvARehalk8amlJe6KHqDS6vtQWKp +0EPLh78JRfgwQQS+19N5XDgeNpp2FamL0BGYsPsnf6GYfCH2cO9WjWgMUNPOb+OQv9x d3qX0kVCvKIrTtgG3EqAhJJnZ2lomg4LsAIWfah2YgjiNfN3HKLeYVqq2WOp/xaADGwq 0rVe/s4oZ6TXL2XlWgVrz+uzIUx3y+vtFsO92HGlvygwwCW2XuBLGuYUGZ+k4btqW4MC 7f7J8iNe5FeFubMnm5YEP6vCeX+WZeHepXUppao0Rwvr2i4AWQh4pl+0EX06bR+URzds Vosg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694524510; x=1695129310; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Uykv/W6wxrMTR+CetWSygO51PMiqrySD1Wapjvl9gBg=; b=iZnsGInUxKqS1iG3NK+WcLj0dTqXEEb3Cvs7FeB1vBba5C1mqEFLHNQcsZNggnQA5w IflJmI7/bVVhdztrTeoI06AtXUt5MC5Vc4Nxd9sizUxpJl5d9A6uEN3rwVQtTeAoTFY1 HhqmB21Z8vZGHce8AE5p0tVTVy/BIibq+mvPHqPkPSIqW2355MDD2Dhm6oVcR8ecj5BV BU55PImfu98aaFPbLHKX5sG0x3vvMaTpav0cGZSMQot+KzEDvuOzuSeBHKKqx0q4RHne dR2tXJPjcIJXU4l0u2yY6GEEyO4JGAquuWNVn6NZjlL1rZJHWb93Ms2xgDxGsH/lGaLq I5Mg== X-Gm-Message-State: AOJu0YztzkuqL2Uj5McFaevR2R9q0OQJXT7kRKs83VS0N0WCgHTFgCMr sxokoW848VFNmp9+EO+F051YsxpPYO6yeRmNfHkKfg== X-Google-Smtp-Source: AGHT+IE7PWYu+zP2FYnpVQVAeUgWT2mpm7SKqvkYfX2PnO2ThbBuyjxdZdLWOECp5guXdSfVa5Scmg== X-Received: by 2002:a4a:919b:0:b0:56c:7428:4a35 with SMTP id d27-20020a4a919b000000b0056c74284a35mr11567134ooh.7.1694524510129; Tue, 12 Sep 2023 06:15:10 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:91cb:e4b5:40b4:e1ca:7dfe]) by smtp.gmail.com with ESMTPSA id x38-20020a4a97e9000000b00569c5eadf15sm4336813ooi.26.2023.09.12.06.15.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:15:09 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 0/2] Use procutils on getsysstats and malloc-hugepages Date: Tue, 12 Sep 2023 10:15:04 -0300 Message-Id: <20230912131506.2571612-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org It allows consolidate the Linux code that parses procfs/sysfs. Adhemerval Zanella (2): linux: Use procutils_read_file on getsysstats linux: Use procutils_read_file on malloc-hugepages sysdeps/aarch64/Makefile | 5 +- sysdeps/unix/sysv/linux/Makefile | 6 + sysdeps/unix/sysv/linux/getsysstats.c | 177 ++++++--------------- sysdeps/unix/sysv/linux/malloc-hugepages.c | 68 ++++---- sysdeps/unix/sysv/linux/pidfd_getpid.c | 2 +- sysdeps/unix/sysv/linux/procutils.c | 4 +- sysdeps/unix/sysv/linux/procutils.h | 4 +- 7 files changed, 95 insertions(+), 171 deletions(-)