Make enable of disk cache statistics code configurable.
* configure.ac: --enable-cache-stats added. * config.h.in (DISK_CACHE_STATS): New define. * grub-core/Makefile.core.def (cacheinfo): New command. * include/grub/disk.h(grub_disk_cache_get_performance): New function. * grub-core/commands/cacheinfo.c: New file. * grub-core/commands/minicmd.c (grub_rescue_cmd_info): Updated and moved to cacheinfo.c. * grub-core/kern/disk.c: Use DISK_CACHE_STATS to disable disk cache debug code. * include/grub/disk.h: Likewise.
This commit is contained in:
parent
a61499a1c3
commit
c5dc16905a
8 changed files with 106 additions and 23 deletions
17
configure.ac
17
configure.ac
|
@ -669,6 +669,17 @@ AC_ARG_ENABLE([mm-debug],
|
|||
[AC_DEFINE([MM_DEBUG], [1],
|
||||
[Define to 1 if you enable memory manager debugging.])])
|
||||
|
||||
AC_ARG_ENABLE([cache-stats],
|
||||
AS_HELP_STRING([--enable-cache-stats],
|
||||
[enable disk cache statistics collection])])
|
||||
|
||||
if test x$enable_cache_stats = xyes; then
|
||||
DISK_CACHE_STATS=1
|
||||
else
|
||||
DISK_CACHE_STATS=0
|
||||
fi
|
||||
AC_SUBST([DISK_CACHE_STATS])
|
||||
|
||||
AC_ARG_ENABLE([grub-emu-usb],
|
||||
[AS_HELP_STRING([--enable-grub-emu-usb],
|
||||
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
|
||||
|
@ -922,6 +933,7 @@ AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
|
|||
AM_CONDITIONAL([COND_GRUB_PE2ELF], [test x$TARGET_OBJ2ELF != x])
|
||||
AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
|
||||
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
|
||||
AM_CONDITIONAL([COND_ENABLE_CACHE_STATS], [test x$DISK_CACHE_STATS = x1])
|
||||
|
||||
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
|
||||
|
||||
|
@ -983,6 +995,11 @@ echo With memory debugging: Yes
|
|||
else
|
||||
echo With memory debugging: No
|
||||
fi
|
||||
if [ x"$enable_cache_stats" = xyes ]; then
|
||||
echo With disk cache statistics: Yes
|
||||
else
|
||||
echo With disk cache statistics: No
|
||||
fi
|
||||
if [ x"$efiemu_excuse" = x ]; then
|
||||
echo efiemu runtime: Yes
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue