Skip to content
Snippets Groups Projects

vkd3d: Print the thread id in trace messages.

Merged Conor McCarthy requested to merge cmccarthy/vkd3d:thread_id into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • It makes sense to me, given that D3D12 encourages applications to use multiple threads to interact with the driver. Actually, couldn't the same be done for Linux, showing the thread ID obtained with gettid()? Or maybe syscall(SYS_gettid), to be compatible with older glibc versions.

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • It would be useful for distinguishing threads using vkd3d, but also a bit confusing because the ids won't match those displayed by Wine.

    • It would be useful for distinguishing threads using vkd3d, but also a bit confusing because the ids won't match those displayed by Wine.

      I think Giovanni's point is to use gettid() on non-Windows platforms? It does seem like it shouldn't block this patch.

    • I think Giovanni's point is to use gettid() on non-Windows platforms? It does seem like it shouldn't block this patch.

      Agree to both.

    • Please register or sign in to reply
  • For use outside Wine, yes that makes sense. It doesn't look like using a vkd3d ELF build in Wine will return anytime soon.

    Linux thread id can be added later though.

  • Linux thread id can be added later though.

    I suppose, though I'm not sure there's much of a point in deferring it.

    I think the tid should come after the "vkd3d:" prefix? That prefix was added in 58c7c4b8 to distinguish vkd3d output from output from applications or other libraries; I imagine we'd like to keep it at the front.

  • Conor McCarthy added 173 commits

    added 173 commits

    Compare with previous version

  • Conor McCarthy added 1 commit

    added 1 commit

    • 6a1f494f - vkd3d: Print the thread id in trace messages.

    Compare with previous version

  • Conor McCarthy changed title from vkd3d: Print the thread id in trace messages from PE builds. to vkd3d: Print the thread id in trace messages.

    changed title from vkd3d: Print the thread id in trace messages from PE builds. to vkd3d: Print the thread id in trace messages.

  • Giovanni Mascellani
    Giovanni Mascellani @giomasce started a thread on an outdated change in commit 6a1f494f
105 106
106 107 assert(level < ARRAY_SIZE(debug_level_names));
107 108
108 vkd3d_dbg_output("vkd3d:%s:%s ", debug_level_names[level], function);
109 #ifdef _WIN32
110 vkd3d_dbg_output("vkd3d:%04lx:%s:%s ", GetCurrentThreadId(), debug_level_names[level], function);
111 #else
112 vkd3d_dbg_output("vkd3d:%04lx:%s:%s ", gettid(), debug_level_names[level], function);
  • gettid() is not portable. That doesn't necessarily prevent us from using it, but it does mean we need to test whether it's available first.

  • Conor McCarthy added 1 commit

    added 1 commit

    • 6e454251 - vkd3d: Print the thread id in trace messages.

    Compare with previous version

  • Giovanni Mascellani unapproved this merge request

    unapproved this merge request

  • Conor McCarthy added 1 commit

    added 1 commit

    • 44422e42 - vkd3d: Print the thread id in trace messages.

    Compare with previous version

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • This needs a (trivial) rebase.

  • Conor McCarthy added 149 commits

    added 149 commits

    Compare with previous version

  • Henri Verbeet approved this merge request

    approved this merge request

  • Alexandre Julliard added 13 commits

    added 13 commits

    Compare with previous version

  • Alexandre Julliard approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading