Message ID | 20200717093517.73397-4-r.bolshakov@yadro.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add dtrace support on macOS | expand |
On Fri, Jul 17, 2020 at 12:35:16PM +0300, Roman Bolshakov wrote: > dtrace on macOS uses unresolved symbols with a special prefix to define > probes [1], only headers should be generated for USDT (dtrace(1)). But > it doesn't support backwards compatible no-op -G flag [2] and implicit > build rules fail. > > 1. https://markmail.org/message/6grq2ygr5nwdwsnb > 2. https://markmail.org/message/5xrxt2w5m42nojkz > > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> > Cc: Cameron Esfahani <dirty@apple.com> > Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> > --- > Makefile.objs | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
On Fri, Jul 17, 2020 at 12:35:16PM +0300, Roman Bolshakov wrote: > dtrace on macOS uses unresolved symbols with a special prefix to define > probes [1], only headers should be generated for USDT (dtrace(1)). But > it doesn't support backwards compatible no-op -G flag [2] and implicit > build rules fail. > > 1. https://markmail.org/message/6grq2ygr5nwdwsnb > 2. https://markmail.org/message/5xrxt2w5m42nojkz > > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> > Cc: Cameron Esfahani <dirty@apple.com> > Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> > --- > Makefile.objs | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Makefile.objs b/Makefile.objs > index d22b3b45d7..982f15ba30 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -211,5 +211,7 @@ trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PAT > trace-obj-y = trace-root.o > trace-obj-y += $(trace-events-subdirs:%=%/trace.o) > trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o > +ifneq ($(CONFIG_DARWIN),y) > trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o > trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o) > +endif > -- > 2.26.1 > An article about DTrace [1] mentions that FreeBSD also doesn't need that: "On FreeBSD/Mac OS X, you do not have to generate a separate probe object file for linking. This makes the compilation process much more straightforward [...]" I don't know for sure but perhaps "-G" makes dummy object files there. 1. https://www.ibm.com/developerworks/aix/library/au-dtraceprobes.html Thanks, Roman
diff --git a/Makefile.objs b/Makefile.objs index d22b3b45d7..982f15ba30 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -211,5 +211,7 @@ trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PAT trace-obj-y = trace-root.o trace-obj-y += $(trace-events-subdirs:%=%/trace.o) trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o +ifneq ($(CONFIG_DARWIN),y) trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o) +endif