[llvm-bugs] [Bug 36790] New: Use string configuration options to configure logging modes

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 18 16:56:16 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36790

            Bug ID: 36790
           Summary: Use string configuration options to configure logging
                    modes
           Product: XRay
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Runtime
          Assignee: dberris at google.com
          Reporter: dberris at google.com
                CC: llvm-bugs at lists.llvm.org

Currently, the xray runtime implementations use a brittle struct-based
configuration system for controlling the options available to a particular
mode. This doesn't scale well and is hard to control dynamically.

Ideally we should be using the flag parsing mechanisms already in the
sanitizer_common library, so that all logging modes should just be configurable
using strings that get parsed as flags. This also allows for easily configuring
these at runtime.

Proposed steps for implementing this change:

1) Implement an alternative means of initialising logging implementations. Call
the function something like `__xray_log_configure_mode(const char* mode, const
char *options, size_t size)`.

2) Allow logging modes to install a configuration handler, different from the
initialisation handler.

Optional steps:

3) Deprecate the initialisation handler registration/API (i.e. mark
`__xray_log_init(...)` as deprecated).

4) Implement an ABI version checker, to prepare for updating the XRayLogImpl
struct (similar to what ASan does).

5) Change the XRayLogImpl struct definition to new layout covering mode
configuration, and in-memory buffer processing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180318/e0e1a7b0/attachment.html>


More information about the llvm-bugs mailing list