mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-05 09:01:07 +00:00
Use MODULE_NAME in stap-probe instead of IN_LIB
Define MODULE_NAME in the build command and define IN_MODULE using MODULE_NAME. Verified that the generated code is unchanged on x86_64. * Makeconfig (module-cppflags-real): Define MODULE_NAME instead of IN_MODULE. * include/libc-symbols.h (IN_MODULE): Define using MODULE_NAME. (PASTE_NAME, PASTE_NAME1): New macros. * include/stap-probe.h (LIBC_PROBE_1): Use MODULE_NAME instead of IN_LIB. (STAP_PROBE_ASM): Likewise.
This commit is contained in:
parent
e0cfa51064
commit
279bc5b3c3
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2014-11-24 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||||
|
|
||||||
|
* Makeconfig (module-cppflags-real): Define MODULE_NAME
|
||||||
|
instead of IN_MODULE.
|
||||||
|
* include/libc-symbols.h (IN_MODULE): Define using
|
||||||
|
MODULE_NAME.
|
||||||
|
(PASTE_NAME, PASTE_NAME1): New macros.
|
||||||
|
* include/stap-probe.h (LIBC_PROBE_1): Use MODULE_NAME instead
|
||||||
|
of IN_LIB.
|
||||||
|
(STAP_PROBE_ASM): Likewise.
|
||||||
|
|
||||||
2014-11-23 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
2014-11-23 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
* sysdeps/mach/hurd/i386/init-first.c (posixland_init): Call
|
* sysdeps/mach/hurd/i386/init-first.c (posixland_init): Call
|
||||||
|
@ -830,9 +830,9 @@ in-module = $(subst -,_,$(firstword $(libof-$(basename $(@F))) \
|
|||||||
libc))
|
libc))
|
||||||
|
|
||||||
module-cppflags-real = -include $(common-objpfx)libc-modules.h \
|
module-cppflags-real = -include $(common-objpfx)libc-modules.h \
|
||||||
-DIN_MODULE=MODULE_$(in-module)
|
-DMODULE_NAME=$(in-module)
|
||||||
|
|
||||||
# We don't need libc-modules.h and the IN_MODULE definition for
|
# We don't need libc-modules.h and the MODULE_NAME definition for
|
||||||
# shlib-version.v.i.
|
# shlib-version.v.i.
|
||||||
module-cppflags = $(if $(filter $(@F),$(skip-module-cppflags)), \
|
module-cppflags = $(if $(filter $(@F),$(skip-module-cppflags)), \
|
||||||
,$(module-cppflags-real))
|
,$(module-cppflags-real))
|
||||||
@ -1008,7 +1008,7 @@ postclean-generated += soversions.mk soversions.i \
|
|||||||
before-compile += $(common-objpfx)libc-modules.h
|
before-compile += $(common-objpfx)libc-modules.h
|
||||||
ifeq ($(soversions.mk-done),t)
|
ifeq ($(soversions.mk-done),t)
|
||||||
# Generate a header with macro definitions for use with the IS_IN macro.
|
# Generate a header with macro definitions for use with the IS_IN macro.
|
||||||
# These are the possible values for the IN_MODULE macro defined when building
|
# These are the possible values for the MODULE_NAME macro defined when building
|
||||||
# sources, to identify which module the translation unit is going to be built
|
# sources, to identify which module the translation unit is going to be built
|
||||||
# into.
|
# into.
|
||||||
$(common-objpfx)libc-modules.h: $(common-objpfx)libc-modules.stmp; @:
|
$(common-objpfx)libc-modules.h: $(common-objpfx)libc-modules.stmp; @:
|
||||||
|
@ -20,8 +20,12 @@
|
|||||||
#ifndef _LIBC_SYMBOLS_H
|
#ifndef _LIBC_SYMBOLS_H
|
||||||
#define _LIBC_SYMBOLS_H 1
|
#define _LIBC_SYMBOLS_H 1
|
||||||
|
|
||||||
|
#define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
|
||||||
#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
|
#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
|
||||||
|
|
||||||
|
#define PASTE_NAME(a,b) PASTE_NAME1 (a,b)
|
||||||
|
#define PASTE_NAME1(a,b) a##b
|
||||||
|
|
||||||
/* This file's macros are included implicitly in the compilation of every
|
/* This file's macros are included implicitly in the compilation of every
|
||||||
file in the C library by -imacros.
|
file in the C library by -imacros.
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
Systemtap's header defines the macros STAP_PROBE (provider, name) and
|
Systemtap's header defines the macros STAP_PROBE (provider, name) and
|
||||||
STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
|
STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
|
||||||
in the IN_LIB name (libc, libpthread, etc.) automagically.
|
in MODULE_NAME (libc, libpthread, etc.) automagically.
|
||||||
|
|
||||||
The format of the arg parameters is discussed here:
|
The format of the arg parameters is discussed here:
|
||||||
|
|
||||||
@ -53,7 +53,7 @@
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define LIBC_PROBE(name, n, ...) \
|
# define LIBC_PROBE(name, n, ...) \
|
||||||
LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
|
LIBC_PROBE_1 (MODULE_NAME, name, n, ## __VA_ARGS__)
|
||||||
|
|
||||||
# define LIBC_PROBE_1(lib, name, n, ...) \
|
# define LIBC_PROBE_1(lib, name, n, ...) \
|
||||||
STAP_PROBE##n (lib, name, ## __VA_ARGS__)
|
STAP_PROBE##n (lib, name, ## __VA_ARGS__)
|
||||||
@ -61,7 +61,7 @@
|
|||||||
# define STAP_PROBE0 STAP_PROBE
|
# define STAP_PROBE0 STAP_PROBE
|
||||||
|
|
||||||
# define LIBC_PROBE_ASM(name, template) \
|
# define LIBC_PROBE_ASM(name, template) \
|
||||||
STAP_PROBE_ASM (IN_LIB, name, template)
|
STAP_PROBE_ASM (MODULE_NAME, name, template)
|
||||||
|
|
||||||
# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
|
# define LIBC_PROBE_ASM_OPERANDS STAP_PROBE_ASM_OPERANDS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user