Skip to content

Releases: stefanbesler/twingrind

v4.0.1

24 Oct 11:14
Compare
Choose a tag to compare
  • fix: properly SFC function blocks, we don't support SFC, but we still want to be able to profile ST code
  • feat: python's recursion limit can now be overwritten when using "reconstruct" or "process", this is useful if there are a lot of nested calls
  • feat: reconstruct now works even without a hashmap file, it will use the hashes as method indicators

v0.4.0

06 Oct 08:51
Compare
Choose a tag to compare
  • feat: Trigger profiling from the commandline. twingrind fetch and twingrind process got new arguments to directly trigger profiling (single shots and resets) from the command line. -s <NUMBER> takes <NUMBER> profiles and -r resets all data, which was already recorded. The latter happens before taking shots, which allows to use both flags to be used simultanously (i.e. twingrind fetch -rs1).
  • feat: Support for using symbol namespaces. TwinCAT could be configured to use the namespace before any symbols by setting the TC_SYM_WITH_NAMESPACE compiler define. Twingrind can now deal with this usecase automatically by trying to connect with the profiler with the default namespace. Additionally, the namespace of the Profiler can be set externally in twingrind fetch and twingrind process by a the new namespace argument -N <Namespace>.

v0.3.1

16 Jun 20:20
Compare
Choose a tag to compare
  • fix: ´twingrind clean` was not working as expected. Now this action complete reverts all changes of twingrind even newlines and spaces, which were not considered correctly before
  • feat: @seehma improved the hash function so that collisions are much less unlikely. This increases performance if Twingrind is used in applications, which use OOP patterns heavily.

v0.3.0

02 Jun 07:01
Compare
Choose a tag to compare
  • support for profile modes for capturing only the slowest or faster cycles
  • improved implementation for continuous capturing of profiles. Rather than only capturing X number of callstacks there is now a mode to overwrite old callstacks in favor of new ones (Mode=All), the old behavior can still be activated as well (Mode=FirstOnesOnly)
  • increased the time resolution of profiling by a factor of 10 from 10us to 0.1us
  • added a parameter to pytwingrind to prefix the files that are generated by it. This facilities comparing of callstacks

v0.2.1

24 May 10:08
Compare
Choose a tag to compare
  • Support for multiple PRGs in 1 task
  • Less boilerplate code that has to be implemented manually (from 3 lines to 1 line :-) )
  • Preparations for multitask support
  • pytwingrind support arbitrary stacksizes now (parametrizeable in Twingrind.ParameterList), default is maximum 160000 calls / cycle
  • Function profiling was broken, fixed by @koppa

v0.2.0

17 May 16:03
Compare
Choose a tag to compare
  • preparing now supports unicode characters in source files
  • reconstrucing a callstack got a massive performance boost by getting rid of nested for loop in favour of directly using numpy

v0.1.1

11 Apr 16:38
Compare
Choose a tag to compare
  • Support for functions (now methods, functionblock bodies and functions are supported)
  • pytwingrind now is an installable python module and not a collection of scripts anymore

v0.1.0

08 Apr 13:45
5c3d9d9
Compare
Choose a tag to compare

Initial release of twingrind, which includes the following features

  • Call-graph profiling of a TwinCAT PLC
  • Twingrind_0.1.0.0.compiled-library, which implements the PLC-side profiling mechanism
  • pytwingrind/prepare.py script to add profiling guards to a PLC and/or PLC libraries, these are used for capturing the callstack of PLC cycles
  • Twingrind.Profiler program to capture the callstack of PLC cycles, either manually or automatic with adjustable cycletime-usage threshold
  • pytwingrind/fetch.py script to extract profiling data from the PLC and store it on disk with base64 encoding
  • pytwingrind/reconstruct.py script to convert the base64 encoded file to the callgrind format

(Known) limitations of this release

  • Only 1 task and 1 PRG are supported.
  • Profiling itself adds some overhead to your code, which can not be avoided by this method, but maybe reduced by a fair bit.
  • No unicode character support in source files