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: 721764 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1635507wrp; Tue, 12 Sep 2023 06:15:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0+Q7BUAiymCugYFH3BT07zcTwVtcBXgXaBFrAtFhvZK2GtkwgEV+j5Dgi7lkLZpzaYG2G X-Received: by 2002:a17:906:5a5a:b0:9a5:c9a4:ba13 with SMTP id my26-20020a1709065a5a00b009a5c9a4ba13mr9985371ejc.37.1694524518974; Tue, 12 Sep 2023 06:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694524518; cv=none; d=google.com; s=arc-20160816; b=xuxL59f7p7eK/X0tvDFpzuaMHbiD+8Dwgahto8eOoOWK4vL+fFdzQkQpx+EaGI9nFh XdyFy0ZTbXbYJpcTCCR9rGo6aKKQRhyNKbPoxqjq8cL3KSFNUwiTpbJAhVXGVhMmrmoe QQBdlDqFJ4QbCLS367e8oIgI8koHPOWOPn6pVuZUilsvZ+bqNl74lgunQyF+2EAoLUOU yKMlecZ5ypk5Vk2WrVAdQFBZsJ3szy1FaMdMFFYGWCrazGnc8ytOent4SdxCXKPrFO28 yJvR5mizCzMjgjW1/sxUbqvKMNVyUzYX48j5JQscIQhYlMjXi6N9ba99TRJAxj6di5Hg 8pkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=Uykv/W6wxrMTR+CetWSygO51PMiqrySD1Wapjvl9gBg=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=rn7WnSb475QoVcWxbfm2esTSuAcU1ne1L7htLuB7wDhOjRBQUUyacf/INcjgVnNXaf A1K7H4No3p70u/ig2OVeKAXp2VWMkqYOoucg1v+8Z9YNobtJ2os8jRrKfq9T4zedKhuk 4ETCqiEIWpBCbUD4kAk4+9B4BsbCyLl1mkxeGEzWBJk6GdvZpPNwmj122hxKaHtPcYih N60GPdRspbTknUoRdbYgsl+5VLzCK1CrUzCV22W7u0ZYQenXlcvVqqgV5SIEbEgpTJoi qqEx5Y05LrH8GAf3ZTrtKh0Ah4hr4guc/JwTNH2SWzMsnymWE4mdGYff58mza1aBH51K fZMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wokNU1Go; spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ty21-20020a170907c71500b009ad7f136a6esi1613678ejc.738.2023.09.12.06.15.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:15:18 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wokNU1Go; spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B331C3858000 for ; Tue, 12 Sep 2023 13:15:17 +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-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+patch=linaro.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(-)