GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add public APIs to set trace and profile function in other threads. · Issue #93503 · python/cpython

Add public APIs to set trace and profile function in other threads. #93503

New issue
Copy link
New issue
Copy link
Closed
#93504
Closed
Add public APIs to set trace and profile function in other threads.#93503
#93504
Copy link

Description

@pablogsal
pablogsal
opened on Jun 5, 2022
Issue body actions

Currently, we have two public c-apis to set tracing and profile functions: PyEval_SetProfile and PyEval_SetThreadTrace. This allows to set tracing and profiling functions in the calling thread. This works well, but is, unfortunately, is limited because there is no way for debuggers and profilers to set the tracing and profiling functions in all existing running threads, only the ones that are newly created. This makes it impossible to reliable profile or debug already running applications using public APIs or to allow to activate/deactivate said profilers or debuggers.

There are two exposed APIs that are private (have a leading underscore) that do what we need: _PyEval_SetProfile and _PyEval_SetTrace. Unfortunately, these APIs are not fully public and they don't generate audit events.

I propose to expose public-facing versions of these APIs so profilers and debuggers can set their tracing/profiling functions in all existing threads.

Activity

  1. pablogsal
    added a commit that references this issue on Aug 4, 2022

    pythongh-93503: Add APIs to set profiling and tracing functions in al…

    d37f6a3
  2. pablogsal
    added a commit that references this issue on Aug 24, 2022

    pythongh-93503: Add APIs to set profiling and tracing functions in al…

    10d7746
  3. pablogsal
    closed this as completedin #93504on Aug 24, 2022
  4. pablogsal
    added a commit that references this issue on Aug 24, 2022

    GH-93503: Add thread-specific APIs to set profiling and tracing funct…

    e34c82a
  5. pablogsal
    added 2 commits that reference this issue on Sep 8, 2022

    pythongh-93503: Document the new tracing/profiling APIs in the What's…

    76af5c9

    gh-93503: Document the new tracing/profiling APIs in the What's new d…

    830a20e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.