diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-22 20:25:22 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-24 12:42:26 +0200 |
commit | 122224d32894a8465a09561fc0a5220f5bb9c2c7 (patch) | |
tree | 4d12f795097e6d633c2b1156f9cf56921dbaa6db /Makefile | |
parent | c87688a05a8b49479ee10127470cc60acebead4a (diff) |
Implement /proc/slabinfo
Add a node 'slabinfo' to the root directory that contains information
about the slab allocator used in GNU Mach.
The formatting code has been taken from Richard Braun's standalone
client available here:
git://darnassus.sceen.net/rbraun/slabinfo.git
* rootdir.c (rootdir_gc_slabinfo): New function.
(rootdir_entries): Add node 'slabinfo'.
* Makefile (OBJS): Add mach_debugUser.o.
(rootdir.o): Add an explicit dependency on mach_debug_U.h.
Furthermore, add rules to create both functions.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1,6 +1,6 @@ TARGET = procfs OBJS = procfs.o netfs.o procfs_dir.o \ - process.o proclist.o rootdir.o dircat.o main.o + process.o proclist.o rootdir.o dircat.o main.o mach_debugUser.o LIBS = -lnetfs -lps -lfshelp -lpthread CC = gcc @@ -19,8 +19,28 @@ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 all: $(TARGET) +rootdir.o: rootdir.c mach_debug_U.h + $(TARGET): $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) clean: $(RM) $(TARGET) $(OBJS) + +# This is the gist of the MIG user stub handling from Hurd's build +# system: + +# Where to find .defs files. +vpath %.defs /usr/include/mach_debug + +MIG = mig +MIGCOM = $(MIG) -cc cat - /dev/null +MIGCOMFLAGS := -subrprefix __ + +%.udefsi: %.defs + $(CPP) -x c $(CPPFLAGS) $(MIGUFLAGS) $($*-MIGUFLAGS) \ + $< -o $*.udefsi + +%_U.h %User.c: %.udefsi + $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) $($*-MIGCOMUFLAGS) < $< \ + -user $*User.c -server /dev/null -header $*_U.h |