perf beauty: Rename socket_ipproto.sh to socket.sh to hold more socket table generators
To avoid having to add new entries to tools/perf/Makefile.perf prep socket.sh so that it can generate other socket table generators, such as the upcoming SOL_ socket level one. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Родитель
fa020dd78f
Коммит
795f91db26
|
@ -516,11 +516,11 @@ kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
|
|||
$(kvm_ioctl_array): $(kvm_hdr_dir)/kvm.h $(kvm_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(kvm_ioctl_tbl)' $(kvm_hdr_dir) > $@
|
||||
|
||||
socket_ipproto_array := $(beauty_outdir)/socket_ipproto_array.c
|
||||
socket_ipproto_tbl := $(srctree)/tools/perf/trace/beauty/socket_ipproto.sh
|
||||
socket_arrays := $(beauty_outdir)/socket.c
|
||||
socket_tbl := $(srctree)/tools/perf/trace/beauty/socket.sh
|
||||
|
||||
$(socket_ipproto_array): $(linux_uapi_dir)/in.h $(socket_ipproto_tbl)
|
||||
$(Q)$(SHELL) '$(socket_ipproto_tbl)' $(linux_uapi_dir) > $@
|
||||
$(socket_arrays): $(linux_uapi_dir)/in.h $(socket_tbl)
|
||||
$(Q)$(SHELL) '$(socket_tbl)' $(linux_uapi_dir) > $@
|
||||
|
||||
sockaddr_arrays := $(beauty_outdir)/sockaddr.c
|
||||
sockaddr_tbl := $(srctree)/tools/perf/trace/beauty/sockaddr.sh
|
||||
|
@ -736,7 +736,7 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc
|
|||
$(sndrv_ctl_ioctl_array) \
|
||||
$(kcmp_type_array) \
|
||||
$(kvm_ioctl_array) \
|
||||
$(socket_ipproto_array) \
|
||||
$(socket_arrays) \
|
||||
$(sockaddr_arrays) \
|
||||
$(vhost_virtio_ioctl_array) \
|
||||
$(madvise_behavior_array) \
|
||||
|
@ -1113,7 +1113,7 @@ clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clea
|
|||
$(OUTPUT)$(sndrv_pcm_ioctl_array) \
|
||||
$(OUTPUT)$(kvm_ioctl_array) \
|
||||
$(OUTPUT)$(kcmp_type_array) \
|
||||
$(OUTPUT)$(socket_ipproto_array) \
|
||||
$(OUTPUT)$(socket_arrays) \
|
||||
$(OUTPUT)$(sockaddr_arrays) \
|
||||
$(OUTPUT)$(vhost_virtio_ioctl_array) \
|
||||
$(OUTPUT)$(perf_ioctl_array) \
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "trace/beauty/generated/socket.c"
|
||||
|
||||
static size_t socket__scnprintf_ipproto(int protocol, char *bf, size_t size, bool show_prefix)
|
||||
{
|
||||
#include "trace/beauty/generated/socket_ipproto_array.c"
|
||||
static DEFINE_STRARRAY(socket_ipproto, "IPPROTO_");
|
||||
|
||||
return strarray__scnprintf(&strarray__socket_ipproto, bf, size, "%d", show_prefix, protocol);
|
||||
|
|
Загрузка…
Ссылка в новой задаче