Friday, July 18, 2014

RAD Telemetry 2.0N Released!

This release focuses on making the Visualizer more responsive.

Run-time

  • Bugfix: fixed a bug where printf format strings containing 64-bit integers followed by strings would not work in certain cases.

Visualizer

  • Bugfix: fixed UI flickering on cursor-key scrolling when hitting edges of the dataset.
  • Bugfix: fixed a bug where semaphore lock counts would not get displayed in the visualizer.
  • Bugfix: fixed a bug where plot highlight state would flicker when scrolling.
  • Bugfix: fixed a bug where LOD plots wouldn't display min/max sometimes.
  • Bugfix: fixed bug where free location was incorrectly reported for long-lived allocations.
  • Bugfix: (OS X) fixed incorrect positioning of server status and search bars.
  • Bugfix: (OS X) dragging with middle mouse button to scroll now works the same way as on other platforms.
  • Enhancement: revised the protocol between Server and Visualizer. When using a dedicated server, network traffic to the visualizer is typically reduced by 5-6x!
  • Enhancement: significantly reduced data fetch times from server.
  • Enhancement: improved prefetching logic in the Visualizer. Waiting for data to load should happen much less often now.
  • Enhancement: UI is now much more responsive when lots of zones are visible.

Server

  • Enhancement: substantially smaller databases when context switch tracking is enabled.
  • Enhancement: dataset processing time is reduced further.

Other

  • Enhancement: (Linux) Telemetry now officially supports CentOS 6 and RHEL 6.


Thursday, June 26, 2014

RAD Telemetry 2.0M Released!

Telemetry 2.0M has just been released.  This release focuses on reducing server-side processing time.

Run-time

  • Change: On PS4, allocate context switch trace buffer directly from the kernel instead of using new[] so no large libc heap is required.


Visualizer

  • Bugfix: fixed missing/flickering zones in presence of thread name changes.
  • Bugfix: fixed incorrect messages appearing in "Log" view in certain cases.
  • Enhancement: reduced fetch times for zones and plots.
  • Enhancement: importing recorded runs from a file is now much faster and displays progress information.


Server

  • Change: updated to SQLite 1.8.5.
  • Enhancement: significant reduction in dataset processing time; in our tests, processing is now typically between 2 and 4 times faster.
  • Enhancement: real-time indexing mode is now much faster - typically 30%-50% longer processing time than late indexing, instead of the 3x and more it was previously.
  • Enhancement: processed datasets are now approximately 25% smaller due to a revised index structure.

Wednesday, May 28, 2014

RAD Telemetry 2.0L3 Released!

Telemetry 2.0L3 has just been released.  This is strictly a minor maintenance release to deal with some small bugs.

Visualizer


  • Bugfix: fixed plot LOD rendering issues
  • Bugfix: file import now works on file names with spaces
  • Bugfix: path names with leading spaces now work
  • Change: warn if we fail to launch tmimport32 or tm2sym
  • Change: remove unused search and memory tabs
  • Enhancement: added TDB double click support on windows

Other


  • Enhancement: added docs on TMO_NULL_NETWORK


Tuesday, April 22, 2014

RAD Telemetry 2.0L released!

Telemetry 2.0L has just been released.  This is strictly a minor maintenance release to deal with some small bugs.

NOTE: The ABI has changed, so be sure to recompile/relink everything instead of just swapping out libraries!

Run Time

  • Bugfix: varargs with float types were not handled properly at times on OS X (64-bit), Linux/x64 and PS4
  • Bugfix: TM_VA_LIST parameters were incorrectly warned as 'stack variables' by checked build
  • Change: Android runtime is now built with -funwind-tables by default
  • Enhancement: checked build now does extra verification to watch for 'wrapper' related bugs

Server

  • Bugfix: unknown string pointers are silently handled instead of generating an exception and associated disconnection
  • Bugfix: locks/timespans could accidentally start with a negative ref count

Visualizer

  • Enhancement: 'edit source code' is now a right-click zone option
  • Bugfix: backgrounds were drawn in green instead of black of any timeline sections were present but the current visible area did not have one defined
  • Bugfix: tooltip was not showing file name and line properly in zone view
  • Bugfix: in some situations Visualizer on Windows would leave clipboard open, locking out other applications from copy/paste

Other

  • Change: added documentation discussing the perils of wrapping calls to Telemetry vs. just using Telemetry in place

Monday, March 31, 2014

RAD Telemetry 2.0K is out!

Telemetry 2.0K is out the door!  The biggest new feature is context switch trapping support on PS4, putting it on a par with Windows and 360.  Also, the directory/file naming structure is no longer so rigid (so you can rename directories and TDB files).  Finally, fetch times for very dense sets of plots, zones, and messages are way faster now.  Some fetches that used to take 15 seconds now take < two seconds!

Note that the server/Visualizer/run-time need to be simultaneously upgraded since there is a small change in the protocol.

Run Time

  • Enhancement: context switch capture on PS4
  • Enhancement: add server configuration API (tmSetServerConfiguration)
  • Bugfix: fixed bug where timespans could hang the run-time if tmOpen was called late
  • Change: linux (and other BSD-ish) network implementation now spew debug on wouldblock (checked build)
  • Change: disabled network policy on PS4 telemetry socket
  • Enhancement: added TM_VAR macro and no longer exclude tmtypes.h on NTELEMETRY.  This means you can wrap Telemetry declarations and variables in a way that is compatible with NTELEMETRY, e.g TM_VAR(TmU64 x);

Server

  • Change: unknown strings are a bit more known (null vs. unrecognized)
  • Enhancement: decoupled sessions from their filenames, so you can now rename files/directories (yay!)
  • Bugfix: fixed crash bug with oversized messages
  • Bugfix: generated mem usage plots (via TMZF_MEM_REGION_EXPERIMENTAL) were using incorrect paths

Visualizer

  • Enhancement: mousewheel now works in message view
  • Enhancement: greatly sped up fetch times for zones, messages, plots, and mem events
  • Enhancement: session notes are now on a separate line and green, and if then completely skipped
  • Change: disable 'copy' button in message pane until all have arrived
  • Change: messages without newlines now have newlines appended automatically
  • Bugfix: fixed file/line missing from zone tooltips


Thursday, February 20, 2014

RAD Telemetry 2.0j released!

This is a minor maintenance and bugfix release, but it does require a recompile/relink.

Run Time

  • Enhancement: tmMessage now has a tmMessageEx variant. This was added so you can change zone label/sublabels in virtual threads.
  • Enhancement: (Windows) you can now specify full path for TMDATA files when using TMCT_FILE captures
  • Bugfix: fixed benign AppVerifier warning about dangling CriticalSection

Server

  • Bugfix: in certain situations long zones would not be recorded properly
  • Bugfix: fixed pathological edge case in zone garbage collector leading to N^2 processing times

Visualizer

  • Change: (Windows) Visualizer now uses system default text editor instead of Notepad when editing notes
  • Enhancement: plot scale with mousewheel should work now
  • Bugfix: double clicking a frame in plot view would sometimes take you to the wrong location
  • Bugfix: right-click 'zoom' on plot would sometimes take you to the wrong location

Other

  • Enhancement: Mac/Linux/Win now have gpu_opengl.cpp sample file included in distributions
  • Enhancement: Python SQLite export script has been greatly enhanced
  • Change: 'tools' only distributions now included exporter script
  • Change: updated zone filtering documentation
  • Change: updated timespan document to note the ordering constraints of *TimespanAt APIs


Tuesday, February 11, 2014

Dynamic Strings: Solution to a Problem and a Problematic Solution Combined

Telemetry's run-time markup system relies on the assumption that string identifiers are both constant and (hopefully) string pooled.  This allows us to send over a string only once when we encounter it, e.g.:

void foo( void )
{
   tmZone( cx, TMZF_NONE, "hello world" ); // "hello world" should be sent only the first time we see it

   // do a bunch of foo stuff
}

This works great for the general case where you're statically marking up a lot of code, which is common when using compiler provided constants like __FUNCTION__.

However sometimes the description you pass to tmEnter or tmZone isn't a const string (e.g. it may be copied out of string table, etc.).  Or (more likely) one of the string parameters you're passing to your zone markup isn't actually a const string and instead a string on the stack.

void foo( char const *name )
{
   // if 'name' points to something on the stack, this may be bad...
   tmZone( cx, TMZF_NONE, "foo: %s", name );
   // do a bunch of foo stuff
}

Here's where the problem occurs.  Since Telemetry assumes that the string pointers passed to it are const, it will try to read from name in its background processing thread probably long after name is out of scope and gone.  In addition, once it sees name's address, it won't send it again.  This is to save a lot of bandwidth, but if the contents of name are constantly changing (which is highly likely) you'll see a lot of the same string repeating in the Telemetry Visualizer (since it's never resent with the new content) instead of the updated string.

(Instead of just using the pointer we could hash the contents, but that has a surprising amount of overhead when working with lots of strings, particularly on lower end devices)

Telemetry's solution to this problem is to allow you to tag certain strings as dynamic, i.e. volatile memory that may change or disappear almost immediately.

void foo( char const *name )
{
   tmZone( cx, TMZF_NONE, "foo: %s", tmDynamicString( cx, name ) );
   // do a bunch of foo stuff
}

Now the full contents of name are sent over immediately every time they're encountered.  In exchange for correctness we've now incurred a potentially massive amount of network overhead.  This is fine as a first pass integration (to make sure your markup is working), but if you leave it in and have a lot of markup you may find that Telemetry is suddenly eating a tremendous amount of network bandwidth due to redundant string sends.  This is really a problem on devices with limited bandwidth to begin with such as WiiU, XBOX 360, and mobile.

Figuring all this out can be a headache, so thankfully Telemetry's server automatically generates plots indicating the amount of dynamic string activity in a session.  If you enable the plots you should be able to see if you're hammering the dynamic string system or not.  A few dozen dynamic strings should be fine, but if you're finding that you're sending over hundreds or thousands of strings every frame, that is likely bad.


If you find yourself in this situation then you'll want to invest some time doing a string pooling/interning system that provides a const mapping from a volatile string to a static one.  There's no easy way for Telemetry to provide this functionality since it depends heavily on your app's underlying string management architecture, but it's a worthwhile investment for the performance.