0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

39 Commits

Author SHA1 Message Date
Victor Zarubkin
86f7a48995 #31 intermediate commit: added basic API for arbitrary values profiling. Still not working. 2017-10-20 22:18:32 +03:00
Victor Zarubkin
c7b9d4f464 #0 [Core] Refactoring: moved a lot of code to different source files 2017-09-30 19:51:33 +03:00
Victor Zarubkin
c813ea655d #53 [Core] Fixed problem with removing ThreadStorage for alive threads. But Linux would have another problem: potential memory leak or potential crash at your choise :)) because these wonderful pthreads does not allow to check thread state :( 2017-09-28 21:04:28 +03:00
Blake Martin
8b4726371e Added a static const member variable for readability and to get rid of a warning. 2017-09-03 21:51:27 -05:00
rationalcoder
bd1f6e49a3 Removed unnecessary syntax and removed a use of constexpr that doesn't compile with MSVC 2013 (slight readability hit). 2017-08-31 19:37:21 -05:00
Blake Martin
186db6691a Removed unnecessary temporary 2017-08-23 14:06:03 -05:00
Blake Martin
d8f2663e01 Removed a type-dependent false type that is no longer used. 2017-08-22 16:31:52 -05:00
Blake Martin
88a401a280 Fixed a logic error introduced with the chunk offset + potentially sped up serialization a bit. 2017-08-22 15:10:19 -05:00
Blake Martin
15323cc8ff Fixed casting issues and fixed an order of operations error. 2017-08-22 13:29:19 -05:00
rationalcoder
283b835dd8 Scrapped the alignment macros and replaced them with force-inline template functions; still need to test thoroughly. 2017-08-19 22:10:51 -05:00
Blake Martin
12d26d6680 progress on strict alignment macros. 2017-08-17 18:35:29 -05:00
Blake Martin
423388e6b0 Updated the chunk_allocator to take the sentinel implementation detail into account + Fixed some formatting inconsistencies 2017-08-16 19:15:27 -05:00
Blake Martin
7a030bc89a Reverted some unnecessary changes and added documentation. 2017-08-16 18:38:37 -05:00
Blake Martin
a4e43bfb8e Fixed some undefined behavior, added documentation, and changed alignment size to be more portable 2017-08-16 16:16:23 -05:00
Blake Martin
2ee5d27baf Fixed Issue #50 Undefined Behavior 2017-08-10 14:58:42 -05:00
Blake Martin
a9591f3070 Added documentation and potentially sped things up a bit. I also commented a potential bug. 2017-08-10 14:23:26 -05:00
Sergey Yagovtsev
5edac7620e fix #51 2017-07-31 17:59:41 +03:00
Victor Zarubkin
ac31aee77c #37 Fix typo 2017-06-07 20:51:45 +03:00
Victor Zarubkin
48fb240ca0 #37 Replaced std::string with char* for NonscopedBlock with manual memory management 2017-06-07 20:50:16 +03:00
Victor Zarubkin
93c3066095 update #42 : Slightly better solution with less amount of black magic - different data structures for context switch events. Core API changed! 2017-06-07 01:39:45 +03:00
Victor Zarubkin
4a9daf3bb4 update #42 : fixed possible statistics display bug; work around storing 64-bit thread id for context switch events (requires testing);
* (GUI) Added popup window when moving mouse cursor to thread name in Diagram window;
2017-06-06 20:46:06 +03:00
Rokas Kupstys
08ae417931 Few more MacOS fixes.
Thread id changed to size_t, required for MacOS because older versions do not have integral thread ids and we must use a pointer returned by pthread_self()/
2017-05-23 19:49:21 +03:00
Victor Zarubkin
dff1d8b2a4 (Core) Update #29 : fixed potential memory leak for NonscopedBlock + linux build 2017-04-17 23:31:07 +03:00
Victor Zarubkin
c2b3a8f5dc (Core) Update #29 - added non-scoped block functionality for beginning and ending block manually from different functions.
(Core) Added new API functions for getting current time (ticks) and converting it to nano- and microseconds.
2017-04-17 22:27:10 +03:00
Victor Zarubkin
f17aa956cd (Core) Add main thread check 2017-04-09 10:23:59 +03:00
Victor Zarubkin
c8e97dac26 (Core) Fixed average frame duration calculation; Fixed addBlockDescription crash when dll/so has been unloaded and loaded again. 2017-04-05 22:36:06 +03:00
Victor Zarubkin
8b7a68266c (Core) Added new API functions for requesting local-average frame duration (like local-max) 2017-04-03 23:08:52 +03:00
Victor Zarubkin
a2b62613a2 (Core) Frame counter: significantly simplified interface - there is no need to start frame counter explicitly. Top block is frame. 2017-04-02 14:23:11 +03:00
Victor Zarubkin
10b04a4748 (Core) First step for getting frame time at run-time.
Now you can use EASY_FRAME_COUNTER (which is only frame-counter) or EASY_FRAME (which is EASY_FRAME_COUNTER + EASY_BLOCK) or EASY_FRAME_FUNCTION (which is EASY_FRAME_COUNTER + EASY_FUNCTION) to measure frame time even if profiler is disabled.
To get frame time you can use profiler::main_thread::frameTimeLocalMax to get maximum frame duration since last call or profiler::main_thread::frameTime to get last frame time.
--- NOTE: You have to put EASY_MAIN_THREAD to your main thread to be able to use profiler::main_thread functions.
If you do not want to then you can use same functions from profiler::this_thread, but you will have to call them from your main thread.
2017-03-31 21:17:08 +03:00
Sergey Yagovtsev
297174942f Relicense under dual MIT/Apache 2.0 2017-03-30 06:18:29 +03:00
Sergey Yagovtsev
15912970db replace double quotes to angle brackets - fixed #28 2017-03-05 23:50:38 +03:00
Sergey Yagovtsev
55000a6325 fixed #27 2017-03-05 22:59:03 +03:00
Rokas Kupstys
e7f5cc0748 New API:
* bool isEnabled()
* bool isListening()
* bool isEventTracingEnabled()
* bool isLowPriorityEventTracing()
2017-03-02 10:26:13 +02:00
Victor Zarubkin
d54ef45c3a MinGW adaptation first try 2017-02-13 20:19:41 +03:00
Holger Rapp
7641951247 Fixes for clang 3.8.
- Disables warnings for no-braced-scalar-init which shows up for ATOMIC_VAR_INIT.
- Fixes compile warnings, mostly "moving a temporary objects prevents
  copy elision" (-Wpessimizing-move) and unused variables.
- Adds some necessary fields to make the sample compile after having
  build the core library.
2017-02-07 17:19:58 +01:00
Victor Zarubkin
e9bed4c839 (Core) Major update (file format NOT affected). Description:
1) Added macro EASY_CONST_NAME(name) to make possible to force EasyProfiler think that given block name is const and not changed during application execution (this rely to compile-time strings saved into a run-time variable);
2) Starting from now, EasyProfiler will not store partially finished frames - first, this means that profiler enabled during frame execution will skip all blocks from this frame, and second, this means that when dumping profiled information profiler will wait until all frames finish before dumping blocks.
2016-12-21 21:59:40 +03:00
Victor Zarubkin
29f81d1244 (Core) Monitoring threads, removing threads without blocks, events and context switches;
* (Core) Context switch events also register threads for current process;
* (Core) Writing process id into output file (old files still could be opened);
2016-12-12 22:26:32 +03:00
Sergey Yagovtsev
58b1fdb8a3 Define alignment size 2016-12-12 03:13:07 +03:00
Sergey Yagovtsev
256f5f6041 Rename src and move include directory 2016-12-02 00:35:25 +03:00