Commit graph

1587 commits

Author SHA1 Message Date
Paul Davis
09c84d1de8 add new GSource-derived object that can be attached to a Glib::MainContext to execute code before other sources have their dispatch() method invoked 2021-08-13 12:51:29 -06:00
Paul Davis
b2a4fe1b50 likely temporary change to visibility inside PBD::int62.h 2021-08-13 12:51:29 -06:00
Paul Davis
111f10638d gcc 6.x requires <typeinfo> for typeid, it seems 2021-08-13 12:51:29 -06:00
Paul Davis
0534d1fbb2 more improvements for int62_h based on rgareus' review 2021-08-13 12:51:28 -06:00
Paul Davis
b7b4c99bc9 Temporal: add new arithmetic operators allowing more inter-operability of int64_t/int62_t; make operator int64_t explicit to avoid hidden use 2021-08-13 12:51:28 -06:00
Paul Davis
788cd5456e add additional methods allowing direct arithmetic operator expressions to be used with PBD::Property 2021-08-13 12:51:28 -06:00
Paul Davis
709df7a08f add operators for self-typed arithmetic 2021-08-13 12:51:28 -06:00
Paul Davis
cb78984c63 add new int62.h header, which implements a generic 62bit-int-plus-flagbit type 2021-08-13 12:51:28 -06:00
Paul Davis
c043156089 new header with an efficient implementation of integer division-rounding-to-nearest 2021-08-13 12:51:28 -06:00
Robin Gareus
8a41931ff4
Print note when stacktrace is too short 2021-07-23 01:43:18 +02:00
Robin Gareus
c5e5659022
Fix crash when demangled symbol is n/a
std::string foo (NULL) can throw a std::__throw_logic_error
which was not caught.
2021-07-19 18:26:22 +02:00
John Emmas
12e1c960b6 Add an extra dependency lib which was previously only needed for Debug builds 2021-07-15 09:30:08 +01:00
Robin Gareus
c92dfed706
Fix windows builds (stacktrace pthread debug) 2021-07-14 16:04:07 +02:00
Robin Gareus
46251c2068
Fix Windows debug builds 2021-07-14 15:07:26 +02:00
Robin Gareus
4651ec8382
Unconditionally enable stacktrace for windows builds
This also fixes an issue introduced 7d39205350
(duplicate variable name "levels".
2021-07-13 13:47:26 +02:00
Robin Gareus
7d39205350
Allow to skip top stacktrace frames
This is useful to hide the call of `PBD::stacktrace` itself.
2021-07-12 04:01:07 +02:00
Robin Gareus
a74b4e8ef0
No more wine 2021-07-03 19:07:25 +02:00
Robin Gareus
bf43c8d2d4
Set thread names 2021-06-30 17:15:27 +02:00
Paul Davis
775f46315f remove debugging output from timing.h 2021-06-29 17:46:03 -06:00
Paul Davis
a36ab0c562 avoid timing stats calculation with <= values from get_microseconds() 2021-06-29 11:13:59 -06:00
Paul Davis
a9f285b82b debugging timing stats by showing how max values are computed 2021-06-29 09:46:46 -06:00
Paul Davis
24ea6c4d30 make it possible to debug one of the RAII TimingStats objects 2021-06-29 09:25:38 -06:00
Paul Davis
b20a541d7e change PBD::microseconds_t to a signed type and check for -1 in TimingStats::update
This may help a Windows issue with the return value of QueryPerformanceCounter
2021-06-28 14:47:48 -06:00
John Emmas
09589c3c94 Add/remove source(s) in our MSVC project (libpbd) 2021-06-28 10:37:54 +01:00
Paul Davis
4fd639eca9 NOOP: remove incomplete comment 2021-06-27 12:48:29 -06:00
Paul Davis
a261d399e0 microsoft docs say that only windows.h is required for QueryPerformance* 2021-06-27 12:17:51 -06:00
Paul Davis
e2f2d0cb0f fix inadvertent typo that would cause compilation failure on windows 2021-06-27 10:53:31 -06:00
Paul Davis
857a9b14d7 more macOS cleanup for microseconds.cc 2021-06-27 10:39:51 -06:00
Paul Davis
347ca5c2fe clean up locally-created mess in libs/pbd/microseconds.cc 2021-06-27 10:28:53 -06:00
Paul Davis
412b6a922d macOS: slight speed up for ::get_microseconds()
Move timebase initialization into microsecond_timer_init() and drop conditional
2021-06-27 10:23:44 -06:00
Paul Davis
db0691d236 macOS: fix compilation warnings on macOS versions where clock_gettime() is finally implemented 2021-06-27 08:24:59 -06:00
Robin Gareus
738b0ad21b
Fix OSX builds (amend 04df26244, a2b5962b6) 2021-06-27 05:09:07 +02:00
Paul Davis
b904fdea5d switch PBD::Timing* to use PBD::get_microseconds() 2021-06-26 20:15:12 -06:00
Paul Davis
2678366555 window compilation fix 2021-06-26 18:53:28 -06:00
Paul Davis
228231d914 window compilation fix 2021-06-26 18:47:08 -06:00
Paul Davis
5c8df87205 window compilation fix 2021-06-26 18:43:17 -06:00
Paul Davis
5289d44821 window compilation fix 2021-06-26 18:40:44 -06:00
Paul Davis
d1967827ca compilation error fix for windows 2021-06-26 18:35:14 -06:00
Paul Davis
b9a85c7dcd compilation error fix for windows 2021-06-26 18:34:46 -06:00
Paul Davis
4c1dcb70bb compilation error fix for windows 2021-06-26 18:33:27 -06:00
Paul Davis
a2b5962b6c add new files for PBD::get_microseconds() 2021-06-26 18:30:11 -06:00
Paul Davis
9e598548f7 put get_microseconds() into PBD namsepace
This implementation is a blend of the two previously in libs/ardour/globals.cc
and libs/pbd/window_timer_utils.cc
2021-06-26 18:25:02 -06:00
Paul Davis
995137aeb3 add PBD::WaitTimerRAII with reverse semantics from PBD::TimerRAII 2021-06-26 11:24:59 -06:00
Robin Gareus
1e5ccd4acc
Use poll timeout workaround on macOS only
Other systems implement proper poll according
to POSIX and return when the pipe is closed.
2021-06-21 03:48:04 +02:00
Robin Gareus
f4166fb61d Fix endless poll on macOS #8753
Harvid daemonizes and does not write anything
to stdout/err. as opposed to select(), poll() on
macOS does not return when the child process
terminates or is killed.

However poll() on an invalid FD does throw an
error and POLLNVAL is set.
2021-06-21 01:58:40 +02:00
Robin Gareus
95f8a3aace
Explicitly prevent unsigned int wrap-around
This is a NOOP (0 - 1) + 2 == (0 + 2) - 1 but avoids
a unsigned int wrap-wrap around for good measure.
2021-06-14 00:43:08 +02:00
Paul Davis
a89ad7a265 add queue-reset method to PBD::TimingStats 2021-06-13 10:28:51 -06:00
Paul Davis
7980ea4d27 add a method to SerializedRCUManager to release the lock when no update is required 2021-06-13 07:58:45 -06:00
Paul Davis
182801b8d7 complete manual reversion of 7bce9899c0 2021-06-11 20:56:33 -06:00
Paul Davis
1b505ddcb1 Revert "modify PBD::TimingStats to discard the first 1000 recorded values to avoid too much influence from chaotic startup conditions"
This reverts commit 7bce9899c0.

1000 at 8192 samples @ 44.1 is > 3 mins; counter may have overflowed. Not a necessary change.
2021-06-11 18:55:25 -06:00