get_samples_for_symbol, get_zone_occurrences_with_thread and get_messages
returned the worker's compressed thread index where the other bindings
(get_threads, get_thread_name, get_thread_zone_stats) take an OS thread id,
and where get_zone_occurrences_with_thread documents one.
get_zone_occurrences_with_thread also looked the index up by position in
GetThreadData(), which isn't ordered by it, so zones were attributed to
another thread. Decompress the index with Worker::DecompressThread, as
get_thread_zone_stats and the profiler do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On macOS, calling connect() twice on a non-blocking socket does not allow distinguishing between successful and unsuccessful completion.
poll() / WSAPoll() would be the correct cross-platform API to check for socket readiness, however on Windows before 10 2004 WSAPoll() never completes on a failed connect().
https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect documents that select() should be used instead. select() is an inferior choice on Unices,
where descriptors (ints) in fd_set are limited to < FD_SETSIZE (1024).
The Python bindings have failed to build on Linux since the server
bindings were added:
- The server dependencies (zstd, Capstone, getopt) contain C sources,
but only CXX was enabled. Enable C in python/CMakeLists.txt.
- An empty CMAKE_INSTALL_BINDIR makes zstd's install() rules fail.
Use "." so the client DLL still lands in the wheel root on Windows.
- TracyServer is linked into a shared module, which needs
position-independent code. Set CMAKE_POSITION_INDEPENDENT_CODE.
All changes are inside python/ and only apply when TRACY_CLIENT_PYTHON
is ON.
Closes#1517
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LPZxBTTREb1SnkZkapQibr
Clicking a message marker on the timeline now selects that message, in addition to opening the messages window and scrolling to it. The selection persists until another message is clicked, and is only shown while the messages window is open.
- The selected message is drawn in yellow, both as a row in the messages and zone info lists and as a bouncing marker on the timeline. Hover keeps its red color and takes priority.
- Clicking a row in the messages list or in the zone info message list also selects it.
While connected, the messages list sticks to the bottom when it is already scrolled there, which is always the case for a window that was just opened. This would override the scroll to the message clicked on the timeline.
The request was only decayed when the row of the message to focus was drawn. If the message was filtered out of the messages list, the request would never expire and the whole list would be drawn without clipping on every frame.
GetBroadcastMessage is given strlen(m_programName), which can exceed
WelcomeMessageProgramNameSize when the program name is set with a long
string (e.g. by the Python bindings). Clamp the length inside
GetBroadcastMessage, which owns the fixed-size buffer.
Also null-terminate names stored in the Python NameBuffer and reject
names that leave no room for the terminator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The '<' of operator< and friends is part of the name, not the start of a
template argument list. ns::Foo::operator<(ns::Foo const&) shortens to
ns::Foo::operator<(), not ns::Foo::operator<>. The '::' inside a conversion
operator's type-id is part of the name as well.
ns::Widget::operator ns::Handle() shortens to operator ns::Handle(), not
Handle().
The shortcut letters were mapped from the physical key, so Ctrl+A needed the key where QWERTY has A, which is Q on AZERTY. Letters now come from `key`, so Ctrl+A is where the layout has A.
Other keys, and letters outside of the Latin alphabet, still use the physical key.
The character of a key can change before it is released (releasing AltGr first), so the key sent on the press is remembered for each physical key and released on key up. This works in every browser.
Dear ImGui only pastes on exactly Ctrl+V, so the chord was ignored even when the browser sent the paste event, which Chrome does. Don't treat Shift or Alt with Ctrl+V as the shortcut, and release the other modifiers when faking Ctrl+V. Firefox sends no paste event for this chord, so nothing changes there.
The paste shortcut flag was only cleared by the key up. Browsers don't send it after a window switch, and macOS drops it while Cmd is held, so the next paste from the browser menu did nothing. Clear the flag when the paste event arrives instead.
The paste shortcut did nothing. Its key event was default-prevented, so the browser sent no paste event. The text of that event was also typed in as characters, which text inputs ignore while Ctrl is held.
Let the browser handle the shortcut. Cache the text from the paste event, and let Dear ImGui paste it like on other platforms. Pastes without the shortcut (e.g. from the menu of the browser) are turned into one, so the text is filtered the same. A newline in a single line input becomes a space instead of being dropped.
The sanitizer's write() interceptor aborts the process when the buffer
touches poisoned bytes, even if the pages are mapped. Global redzones
are such bytes, and clang counts them in the global's symbol size, so
a symbol code query can request a range spanning the redzone and kill
the profiled app. syscall() is not intercepted; the kernel does the
copy and fails unmapped pages with EFAULT, like without the sanitizer.