Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use string configuration options to configure logging modes #36138

Closed
llvmbot opened this issue Mar 18, 2018 · 1 comment
Closed

Use string configuration options to configure logging modes #36138

llvmbot opened this issue Mar 18, 2018 · 1 comment
Labels
bugzilla Issues migrated from bugzilla xray

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 18, 2018

Bugzilla Link 36790
Resolution FIXED
Resolved on May 03, 2018 23:39
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

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:

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

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

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

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 4, 2018

This is now fixed, partially. The remaining steps are:

  • Implementing an ABI version check, to prepare for changing the ABI (removing functions, updating types, etc.)

  • Changing the XRayLogImpl struct to support newer framework/API additions to support newer functionality.

We'll track the work of those things independently.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla xray
Projects
None yet
Development

No branches or pull requests

1 participant