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

212 Commits

Author SHA1 Message Date
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
01415cbdb8 Again, auto can only add to confusion here. 2017-08-22 15:07:37 -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
rationalcoder
75e4f35abe Added EASY_FORCE_INLINE 2017-08-19 22:08:27 -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
6fc445ae9a got rid of the forced -O3 optimization for UNIX 2017-08-16 16:17:57 -05:00
Blake Martin
28f755e0b3 There is no point in using auto here. 2017-08-16 16:17:11 -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
Blake Martin
60c9f76478 Got rid of 'passing NULL to non-pointer argument' warning with MinGW 2017-08-10 14:22:28 -05:00
Sergey Yagovtsev
6f447be33d Merge pull request #58 from oliverdaniell/fix/cmake
Moved bin from the source tree to the build tree
2017-08-10 20:50:54 +04:00
Oliver Daniell
a03ec76322 set BUILD_SHARED_LIBS to ON by default. Updated comment 2017-08-10 12:22:59 +01:00
Oliver Daniell
a02cfa925a message BUILD_SHARED_LIBS directly 2017-08-10 11:24:21 +01:00
Oliver Daniell
36bade1939 Replaced custom Shared/Static lib option with the deafult cmake option 2017-08-10 09:41:31 +01:00
Liareth
b0aae2349c Added the /WX flag, which treats compiler warnings as errors in MSVC.
* This required a minor change to CMakeLists.txt.
* Also updated two occurrences in code where compilation failed due to
implicit narrowing conversions.
2017-08-09 17:53:28 +01:00
Sergey Yagovtsev
5edac7620e fix #51 2017-07-31 17:59:41 +03:00
Victor Zarubkin
39d7937397 Update copyright in resources.rc 2017-06-19 00:54:27 +03:00
Victor Zarubkin
15cdb78afb small update (comment) for easy_profiler_core/CMakeLists.txt 2017-06-19 00:53:50 +03:00
Sergey Yagovtsev
8030f3fd15 Merge pull request #47 from karimnaaji/macos
Fix mac os build
2017-06-19 00:31:13 +03:00
Sergey Yagovtsev
f7b26ac3f4 update #44: build fix 2017-06-14 11:33:17 +03:00
Sergey Yagovtsev
c2765ca94d update #44: set target public compile properties 2017-06-14 11:11:34 +03:00
Sergey Yagovtsev
83cea794de update #44: install fix. remove version.ifo from installation 2017-06-14 10:32:58 +03:00
Rokas Kupstys
941f7a4b45 Fix for static build.
Fix for c++11 on apple systems.
2017-06-13 18:57:53 +03:00
Karim Naaji
504648d613 Fix mac os build
- Work around lack of clock_gettime() on OS X
2017-06-12 11:30:01 -04:00
Rokas Kupstys
ba09dc290e Enable colors by default. It seems code does not really support turning them off at the moment. 2017-06-12 11:45:45 +03:00
Rokas Kupstys
f007152d2c CMake script rework 2017-06-12 10:36:42 +03:00
Sergey Yagovtsev
c608665e06 Remove log about client connection 2017-06-12 01:04:51 +03:00
Sergey Yagovtsev
71ffde98de fix #46 2017-06-11 19:34:28 +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
Sergey Yagovtsev
b14dbef78d update #42: linux build 2017-06-06 23:52:18 +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
Sergey Yagovtsev
ec21fa0554 fix #40 2017-06-06 13:57:19 +03:00
Victor Zarubkin
65ac892e32 Fixing problems after changing thread_id_t to uint64_t from uint32_t: There is still a big problem with target-thread ids of context-switch events on *nix systems (it has been stored in block_id_t which is uint32_t and now it requires Core API changes to support new thread_id_t). Also there is a problem with statistics displaying (for top-level blocks parent_index had value of thread-id, it requires a work around now). 2017-06-05 21:24:01 +03:00
Sergey Yagovtsev
1c5084c6de for #41: minor beautifulize 2017-06-05 13:11:02 +03:00
Sergey Yagovtsev
ccd0626bf8 backward compatibility with old size of thread_id_t. For #41 2017-06-05 12:57:12 +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
Josh Engebretson
a01187cf55 Networking fixes for MacOS
Qualify type for std::abs
2017-05-23 19:47:29 +03:00
Sergey Yagovtsev
f988cd4809 v1.2.0 2017-05-08 12:32:56 +03:00
Sergey Yagovtsev
ecbe7780e6 (Core) close #39 Add following cmake options to easy_profiler_core CMakeLists:
BUILD_WITH_CHRONO_STEADY_CLOCK - use std::chrono::steady_clock as a timer. By default is OFF
BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK - use std::chrono::high_resolution_clock as a timer. By default is OFF

If both is set to ON - use std::chrono::high_resolution_clock.
If both is set to OFF - use QueryPerformanceCounter/rtdsc timer.

Note: Do not forget clean CMakeCache file if you've changed an option.
2017-05-06 11:54:24 +03:00
Victor Zarubkin
714e4e0bab (Core) #39 Added macros for possibility to choose std::chrono timer type: EASY_CHRONO_HIGHRES_CLOCK for high_resolution_clock and EASY_CHRONO_STEADY_CLOCK for steady_clock - Use it in CMakeLists.txt 2017-05-04 21:40:48 +03:00
Victor Zarubkin
50b3cc8b7a (Core) Fixed old typo in ProfileManager::setBlockStatus() 2017-05-03 21:18:14 +03:00
Victor Zarubkin
e1bc731570 #37 enclosed MinGW specific 2017-05-01 04:03:26 +03:00
Victor Zarubkin
593395a4aa (Core) #37 No manual ~string() call 2017-04-30 00:17:15 +03:00
Victor Zarubkin
d1e68e0cec (Core) Calculating total children duration per thread/frame/parent 2017-04-20 22:29:02 +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
Sergey Yagovtsev
d02e568dae v1.1.0 2017-04-10 23:39:00 +03:00
Victor Zarubkin
f17aa956cd (Core) Add main thread check 2017-04-09 10:23:59 +03:00
Victor Zarubkin
f00d731da4 (Core) Fixed main thread name compare 2017-04-09 09:12:27 +03:00
Victor Zarubkin
a9d13deb18 (Core) Fixed serious error caused by invoking endBlock() while dumping blocks to stream/file 2017-04-06 23:10:14 +03:00
Victor Zarubkin
654bfdf9da (Core) Fix incorrect storing 2017-04-06 22:59:33 +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
Victor Zarubkin
08372ac136 Update license 2017-03-30 06:55:15 +03:00
Victor Zarubkin
7f085ef8ac Merge branch 'develop' of https://github.com/yse/easy_profiler into develop 2017-03-30 06:49:06 +03:00
Victor Zarubkin
8ae5139b87 (Core): Trying to reduce data copying while sending profiled information 2017-03-30 06:47:00 +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
Sergey Yagovtsev
072fb91467 fixes 26 2017-03-04 13:39:42 +03:00
Victor Zarubkin
95ad72c9a7 A couple of fixes for pull-request 2017-03-03 00:29:45 +03:00
Victor Zarubkin
a9dea6faa6 Merge branch 'rokups-feature/getters' into develop 2017-03-03 00:19:12 +03:00
Sergey Yagovtsev
a0e1ce459f Android build 2017-03-02 16:13:59 +03:00
Rokas Kupstys
8f7ffa9102 Fix atomic memory model in setEventTracingEnabled() 2017-03-02 10:28:43 +02:00
Rokas Kupstys
e7f5cc0748 New API:
* bool isEnabled()
* bool isListening()
* bool isEventTracingEnabled()
* bool isLowPriorityEventTracing()
2017-03-02 10:26:13 +02:00
Sergey Yagovtsev
d89e5ff590 Add select function for checking connection 2017-03-01 20:56:43 +03:00
Rokas Kupstys
88c14e25f6 Fix multiple defined symbols of DEFAULT_ADDRESS on gcc+linux. 2017-03-01 11:12:35 +02:00
Sergey Yagovtsev
b5c1e69f8b v1.0.3 2017-02-28 06:38:30 +03:00
Sergey Yagovtsev
ba0f73bcf6 Install cmake into lib subdir.
Set public target compile definition to BUILD_WITH_EASY_PROFILER.
Install to system directory
2017-02-28 06:32:31 +03:00
Victor Zarubkin
9d88b3d831 prepare for v1.0.3 2017-02-25 14:33:45 +03:00
Victor Zarubkin
0e6f12e6a2 Icons refactoring and change company name 2017-02-14 22:22:16 +03:00
Victor Zarubkin
6d3a4a0aed MinGW build fixes: Thanks to https://github.com/Nitrotoluol for help! 2017-02-14 21:22:26 +03:00
Victor Zarubkin
d54ef45c3a MinGW adaptation first try 2017-02-13 20:19:41 +03:00
Victor Zarubkin
11fbfe65d4 Added more log messages (logging could be enabled via set(EASY_OPTION_LOG ON) in easy_profiler_core/CMakeLists.txt) 2017-02-08 23:20:09 +03:00
Victor Zarubkin
227a23c266 Added possibility to disable predefined colors palette to reduce binary size when user want to use own colors palette 2017-02-08 22:35:46 +03:00
Victor Zarubkin
105d8334e1 Removed redundant copying of data from std::stringstream to std::ofstream in dumpBlocksToFile() 2017-02-08 22:06:38 +03:00
Victor Zarubkin
c0a23866ed Cross-compiler way of C++11 standard requirement (NOTICE: Need to test on Unix systems) 2017-02-08 21:47:20 +03:00
Sergey Yagovtsev
d564b6ef4e Saving files before refreshing line endings 2017-02-08 00:14:49 +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
Sergey Yagovtsev
d338c022fb v1.0.2 2017-02-07 06:22:34 +03:00
Sergey Yagovtsev
7ef004e400 CMake package layout for core 2017-02-07 06:01:26 +03:00
Victor Zarubkin
8057154fe5 (EasyProfiler.ETW) Fixed typo in system process name 2016-12-27 20:54:10 +03: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
5977dbda11 (Core) ETW logging: replaced std::cerr with macro EASY_ETW_LOG to make possible to change output destination 2016-12-21 21:49:29 +03:00
Victor Zarubkin
0a57ff381c (GUI) Please, read NOTICE for that commit.
1) Added active time calculation (this is duration excluding context switch time).
2) Columns "Duration", "Self Dur.", "Self %", "% / Frame", "Active time", "Active %" in Plain mode shows total values per frame (sum of all values per frame).
2016-12-18 17:59:41 +03:00
Victor Zarubkin
e5dccfb8be (GUI) Added hierarchy window mode: full hierarchy, plain mode (only functions list) 2016-12-18 15:56:08 +03:00
Victor Zarubkin
bfb81a7db0 CMake: removed tabs from options print 2016-12-17 16:29:03 +03:00
Victor Zarubkin
d85f9864d6 (GUI) Added statistics gathering for context switches (calls number, total duration, % per thread or frame).
Known issue: if context switch events occur out of profiled blocks then percent/thread may be calculated wrong as it is calculating relative to thread profiled time (which may be a very low value).
2016-12-14 23:17:02 +03:00
Victor Zarubkin
8cfeb1b7f2 (Windows ETW) Added process names for pid=4 (System) and threadID=0 (System Idle) 2016-12-14 23:12:16 +03:00
Victor Zarubkin
7883371166 (GUI) Added calculation of thread wait time (sum of all context switches) 2016-12-14 22:16:14 +03:00
Victor Zarubkin
0304a55c15 (Core) Added macro USING_EASY_PROFILER which is defined when EasyProfiler is actually used. 2016-12-14 21:40:46 +03:00
Victor Zarubkin
7b63ae39d2 CMake + core: added options to CMakeLists.txt. TODO: maybe set them via CMake "option(...)" command 2016-12-13 21:53:29 +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
4cb7d90e49 Prevent crash on exited thread 2016-12-12 03:12:50 +03:00
Sergey Yagovtsev
98b3ac3a8f Merge pull-request 2016-12-12 02:24:36 +03:00
Victor Zarubkin
5e4193cb13 (ETW) setDebugPrivelege() rename 2016-12-11 03:31:22 +03:00
Sergey Grivskiy
63e036f11a custom core library name (for cross-platform build, like easy_profiler_eabihf), ex: "cmake -DLIB_NAME=easy_profiler_x64 ../easy_profiler_core" 2016-12-09 15:01:47 +03:00
Sergey Grivskiy
4db9c82729 fix: wrong results for ARM: empty getCurrentTime() for ARM and other architectures 2016-12-09 15:01:47 +03:00
Victor Zarubkin
88dc699099 No need to check for nullptr while deleting 2016-12-08 22:19:45 +03:00
Victor Zarubkin
041ed6beab (easy_profiler_core) reader: fixed uint64_t overflow while converting ticks to nanoseconds. TODO: maybe use 128-bit integers in future. 2016-12-04 18:42:32 +03:00
Sergey Yagovtsev
052bd47452 Set CXX standard by cmake 2016-12-04 16:50:58 +03:00
Sergey Yagovtsev
cbbf570fae Define EASY_PRODUCT_VERSION by concatenating major, minor and patch strings 2016-12-04 16:40:00 +03:00
Sergey Yagovtsev
256f5f6041 Rename src and move include directory 2016-12-02 00:35:25 +03:00