这是indexloc提供的服务,不要输入任何密码
Skip to content

Add DTrace Support of MacOS #4758

@SeanTAllen

Description

@SeanTAllen

We used to support Dtrace on MacOS. However, Apple has changed what they support for dtrace. They removed the -G option that is used to create elf object files that contain probe definitions. The Pony dtrace support is built around creating said object files and linking them in.

I am not an expert on what Apple did, but it appears to be related to SIP and there appear to be ways to add equivalent support but, it also appears to me to be non-trivial.

At the moment, compiling on macos with use=dtrace errors out almost immediately. You can find the dtrace commands that cause the issue by looking for

if(PONY_USE_DTRACE)
    add_custom_command(OUTPUT dtrace_probes.o
        COMMAND dtrace -h -s "${CMAKE_CURRENT_SOURCE_DIR}/../common/dtrace_probes.d" -o "${CMAKE_CURRENT_SOURCE_DIR}/../common/dtrace_probes.h"
        COMMAND dtrace -G -s "${CMAKE_CURRENT_SOURCE_DIR}/../common/dtrace_probes.d" -o dtrace_probes.o
    )
    target_sources(libponyrt PRIVATE dtrace_probes.o)
endif()

in src/libponyrt/CMakeLists.txt.

It is attempting to compile a dtrace_probes.o for the standard runtime dtrace probes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededneeds investigationThis needs to be looked into before its "ready for work"

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions