!625 [sync] PR-610: display declaration fstat function, make fstat call the system fstat function

From: @openeuler-sync-bot 
Reviewed-by: @yang_yanchao 
Signed-off-by: @yang_yanchao
This commit is contained in:
openeuler-ci-bot 2023-07-04 01:56:38 +00:00 committed by Gitee
commit c31dcc9833
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 3b1ee2b0be6ef6a78ae86482eb336f3ac2976fc8 Mon Sep 17 00:00:00 2001
From: lijianglin <lijianglin2@huawei.com>
Date: Tue, 13 Jun 2023 11:12:22 +0800
Subject: [PATCH] display declaration fstat function, make fstat call the
system fstat function
the patch(commit 8ed005daf0ab03e142500324a34087ce179ae78) changed the implementation
process of interface fstat and used a new system call newfstatat, which resulted in a
decrease in the performance of fstat.this patch make fstat call the original system
call to restore performance.
---
sysdeps/unix/sysv/linux/fxstat64.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index be127982..52775f7e 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -76,6 +76,10 @@ strong_alias (___fxstat64, __fxstat64)
#if XSTAT_IS_XSTAT64
strong_alias (___fxstat64, __fxstat)
+int fstat (int __fd, struct stat *__statbuf)
+{
+ return __fxstat (_STAT_VER, __fd, (struct stat64 *)__statbuf);
+}
#endif
#endif /* LIB_COMPAT */
--
2.33.0

View File

@ -70,7 +70,7 @@
##############################################################################
Name: glibc
Version: 2.34
Release: 123
Release: 124
Summary: The GNU libc libraries
License: %{all_license}
URL: http://www.gnu.org/software/glibc/
@ -317,6 +317,8 @@ Patch9040: add-GB18030-2022-charmap.patch
Patch9041: add-Wl-z-noseparate-code-for-so.patch
%endif
Patch9042: display-declaration-fstat-function-make-fstat-call-t.patch
Provides: ldconfig rtld(GNU_HASH) bundled(gnulib)
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext
@ -1481,6 +1483,9 @@ fi
%endif
%changelog
* Thu Jun 8 2023 lijianglin <lijianglin2@huawei.com> - 2.34-124
- display declaration fstat function, make fstat call the system fstat function
* Sun Jun 4 2023 Qingqing Li <liqingqing3@huawei.com> - 2.34-123
- x86: add noseparate-code for bash program performance

View File

@ -135,3 +135,4 @@ locale/tst-localedef-path-norm:loongarch64
misc/tst-glibcsyscalls:loongarch64
# Failed for environment, remove it later.
resolv/tst-resolv-res_init-multi:loongarch64
elf/check-localplt