mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
Merge branch 'develop' of https://github.com/yse/easy_profiler into develop
This commit is contained in:
commit
339f392e7e
@ -30,10 +30,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#ifndef EASY_______CURRENT_TIME_H_____
|
||||
#define EASY_______CURRENT_TIME_H_____
|
||||
#ifndef EASY_PROFILER_CURRENT_TIME_H
|
||||
#define EASY_PROFILER_CURRENT_TIME_H
|
||||
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
@ -142,4 +142,4 @@ static inline profiler::timestamp_t getCurrentTime()
|
||||
}
|
||||
|
||||
|
||||
#endif // EASY_______CURRENT_TIME_H_____
|
||||
#endif // EASY_PROFILER_CURRENT_TIME_H
|
||||
|
@ -30,7 +30,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#include "easy/easy_socket.h"
|
||||
#include <easy/easy_socket.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <thread>
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include <memory.h>
|
||||
#include <chrono>
|
||||
#include <unordered_map>
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
#include "profile_manager.h"
|
||||
#include "current_time.h"
|
||||
|
||||
|
@ -43,8 +43,8 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY_PROFILER__EVENT_TRACE_WINDOWS__H_
|
||||
#define EASY_PROFILER__EVENT_TRACE_WINDOWS__H_
|
||||
#ifndef EASY_PROFILER_EVENT_TRACE_WINDOWS_H
|
||||
#define EASY_PROFILER_EVENT_TRACE_WINDOWS_H
|
||||
#ifdef _WIN32
|
||||
|
||||
#define INITGUID // This is to enable using SystemTraceControlGuid in evntrace.h.
|
||||
@ -116,4 +116,4 @@ namespace profiler {
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // EASY_PROFILER__EVENT_TRACE_WINDOWS__H_
|
||||
#endif // EASY_PROFILER_EVENT_TRACE_WINDOWS_H
|
||||
|
@ -38,8 +38,8 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY_PROFILER__COMPILER_SUPPORT__H_______
|
||||
#define EASY_PROFILER__COMPILER_SUPPORT__H_______
|
||||
#ifndef EASY_PROFILER_COMPILER_SUPPORT_H
|
||||
#define EASY_PROFILER_COMPILER_SUPPORT_H
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@ -143,4 +143,4 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY_PROFILER__COMPILER_SUPPORT__H_______
|
||||
#endif // EASY_PROFILER_COMPILER_SUPPORT_H
|
||||
|
@ -33,7 +33,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
#define EASY________SOCKET_________H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -30,10 +30,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#ifndef EASY_PROFILER____H_______
|
||||
#define EASY_PROFILER____H_______
|
||||
#ifndef EASY_PROFILER_H
|
||||
#define EASY_PROFILER_H
|
||||
|
||||
#include "easy/profiler_aux.h"
|
||||
#include <easy/profiler_aux.h>
|
||||
|
||||
#if defined ( __clang__ )
|
||||
# pragma clang diagnostic push
|
||||
@ -59,7 +59,7 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
/** Macro for beginning of a block with custom name and color.
|
||||
|
||||
\code
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
void foo()
|
||||
{
|
||||
// some code ...
|
||||
@ -99,7 +99,7 @@ Block will be automatically completed by destructor.
|
||||
/** Macro for beginning of a block with function name and custom color.
|
||||
|
||||
\code
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
void foo(){
|
||||
EASY_FUNCTION(); // Block with name="foo" and default color
|
||||
//some code...
|
||||
@ -129,7 +129,7 @@ Name of the block automatically created with function name.
|
||||
/** Macro for completion of last opened block.
|
||||
|
||||
\code
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
int foo()
|
||||
{
|
||||
// some code ...
|
||||
@ -679,4 +679,4 @@ namespace profiler {
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif // EASY_PROFILER____H_______
|
||||
#endif // EASY_PROFILER_H
|
||||
|
@ -42,12 +42,13 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY_PROFILER__AUX__H_______
|
||||
#define EASY_PROFILER__AUX__H_______
|
||||
#ifndef EASY_PROFILER_AUX_H
|
||||
#define EASY_PROFILER_AUX_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "easy/easy_compiler_support.h"
|
||||
#include "easy/profiler_colors.h"
|
||||
|
||||
#include <easy/easy_compiler_support.h>
|
||||
#include <easy/profiler_colors.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -194,4 +195,4 @@ namespace profiler {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY_PROFILER__AUX__H_______
|
||||
#endif // EASY_PROFILER_AUX_H
|
||||
|
@ -30,8 +30,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#ifndef EASY_PROFILER__COLORS__H_______
|
||||
#define EASY_PROFILER__COLORS__H_______
|
||||
#ifndef EASY_PROFILER_COLORS_H
|
||||
#define EASY_PROFILER_COLORS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -399,4 +399,4 @@ namespace profiler {
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY_PROFILER__COLORS__H_______
|
||||
#endif // EASY_PROFILER_COLORS_H
|
||||
|
@ -39,8 +39,9 @@ along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include "easy/profiler.h"
|
||||
#include "easy/serialized_block.h"
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/serialized_block.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -30,10 +30,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#ifndef EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
||||
#define EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
||||
#ifndef EASY_PROFILER_SERIALIZED_BLOCK_H
|
||||
#define EASY_PROFILER_SERIALIZED_BLOCK_H
|
||||
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
|
||||
namespace profiler {
|
||||
|
||||
@ -99,4 +99,4 @@ namespace profiler {
|
||||
|
||||
} // END of namespace profiler.
|
||||
|
||||
#endif // EASY_PROFILER_SERIALIZED_BLOCK__H_______
|
||||
#endif // EASY_PROFILER_SERIALIZED_BLOCK_H
|
||||
|
@ -41,9 +41,11 @@
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
#include "profile_manager.h"
|
||||
#include "easy/serialized_block.h"
|
||||
#include "easy/easy_net.h"
|
||||
#include "easy/easy_socket.h"
|
||||
|
||||
#include <easy/serialized_block.h>
|
||||
#include <easy/easy_net.h>
|
||||
#include <easy/easy_socket.h>
|
||||
|
||||
#include "event_trace_win.h"
|
||||
#include "current_time.h"
|
||||
|
||||
|
@ -30,14 +30,16 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#ifndef EASY_PROFILER____MANAGER____H______
|
||||
#define EASY_PROFILER____MANAGER____H______
|
||||
#ifndef EASY_PROFILER_MANAGER_H
|
||||
#define EASY_PROFILER_MANAGER_H
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/easy_socket.h>
|
||||
|
||||
#include "easy/profiler.h"
|
||||
#include "easy/easy_socket.h"
|
||||
#include "spin_lock.h"
|
||||
#include "outstream.h"
|
||||
#include "hashed_cstr.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
@ -452,4 +454,4 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // EASY_PROFILER____MANAGER____H______
|
||||
#endif // EASY_PROFILER_MANAGER_H
|
||||
|
@ -56,8 +56,10 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#include "easy/reader.h"
|
||||
#include <easy/reader.h>
|
||||
|
||||
#include "hashed_cstr.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iterator>
|
||||
|
@ -30,8 +30,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
**/
|
||||
|
||||
#ifndef EASY_PROFILER__SPIN_LOCK__________H______
|
||||
#define EASY_PROFILER__SPIN_LOCK__________H______
|
||||
#ifndef EASY_PROFILER_SPIN_LOCK_H
|
||||
#define EASY_PROFILER_SPIN_LOCK_H
|
||||
|
||||
#define EASY_USE_CRITICAL_SECTION // Use CRITICAL_SECTION instead of std::atomic_flag
|
||||
|
||||
@ -113,4 +113,4 @@ namespace profiler {
|
||||
# undef EASY_USE_CRITICAL_SECTION
|
||||
#endif
|
||||
|
||||
#endif // EASY_PROFILER__SPIN_LOCK__________H______
|
||||
#endif // EASY_PROFILER_SPIN_LOCK_H
|
||||
|
@ -50,18 +50,21 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__GRAPHICS_VIEW__H_
|
||||
#define EASY__GRAPHICS_VIEW__H_
|
||||
#ifndef EASY_GRAPHICS_VIEW_H
|
||||
#define EASY_GRAPHICS_VIEW_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unordered_set>
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsItem>
|
||||
#include <QPoint>
|
||||
#include <QRectF>
|
||||
#include <QTimer>
|
||||
#include <QLabel>
|
||||
#include "easy/reader.h"
|
||||
|
||||
#include <easy/reader.h>
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -321,4 +324,4 @@ private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__GRAPHICS_VIEW__H_
|
||||
#endif // EASY_GRAPHICS_VIEW_H
|
||||
|
@ -50,14 +50,16 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__TREE_WIDGET__H_
|
||||
#define EASY__TREE_WIDGET__H_
|
||||
#ifndef EASY_TREE_WIDGET_H
|
||||
#define EASY_TREE_WIDGET_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QTimer>
|
||||
|
||||
#include "tree_widget_loader.h"
|
||||
#include "tree_widget_item.h"
|
||||
#include "easy/reader.h"
|
||||
|
||||
#include <easy/reader.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -201,4 +203,4 @@ private:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__TREE_WIDGET__H_
|
||||
#endif // EASY_TREE_WIDGET_H
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <QRgb>
|
||||
#include <QString>
|
||||
#include <QFont>
|
||||
#include "easy/reader.h"
|
||||
#include <easy/reader.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -43,14 +43,16 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__DESCRIPTORS__WIDGET__H_
|
||||
#define EASY__DESCRIPTORS__WIDGET__H_
|
||||
#ifndef EASY_DESCRIPTORS_WIDGET_H
|
||||
#define EASY_DESCRIPTORS_WIDGET_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QString>
|
||||
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
#include "easy/profiler.h"
|
||||
|
||||
#include <easy/profiler.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -196,4 +198,4 @@ private:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__DESCRIPTORS__WIDGET__H_
|
||||
#endif // EASY_DESCRIPTORS_WIDGET_H
|
||||
|
@ -43,8 +43,8 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__CHRONOMETER_ITEM__H_
|
||||
#define EASY__CHRONOMETER_ITEM__H_
|
||||
#ifndef EASY_CHRONOMETER_ITEM_H
|
||||
#define EASY_CHRONOMETER_ITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QRectF>
|
||||
@ -132,4 +132,4 @@ private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__CHRONOMETER_ITEM__H_
|
||||
#endif // EASY_CHRONOMETER_ITEM_H
|
||||
|
@ -43,14 +43,17 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__GRAPHICS_ITEM__H_
|
||||
#define EASY__GRAPHICS_ITEM__H_
|
||||
#ifndef EASY_GRAPHICS_ITEM_H
|
||||
#define EASY_GRAPHICS_ITEM_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QRectF>
|
||||
#include <QString>
|
||||
#include "easy/reader.h"
|
||||
|
||||
#include <easy/reader.h>
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -179,4 +182,4 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__GRAPHICS_ITEM__H_
|
||||
#endif // EASY_GRAPHICS_ITEM_H
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include <QResizeEvent>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QMenu>
|
||||
#include <QDebug>
|
||||
#include "easy_graphics_scrollbar.h"
|
||||
#include "globals.h"
|
||||
|
||||
|
@ -28,11 +28,11 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__GLOBALS_QOBJECTS_H___
|
||||
#define EASY__GLOBALS_QOBJECTS_H___
|
||||
#ifndef EASY_GLOBALS_QOBJECTS_H
|
||||
#define EASY_GLOBALS_QOBJECTS_H
|
||||
|
||||
#include <QObject>
|
||||
#include "easy/profiler.h"
|
||||
#include <easy/profiler.h>
|
||||
|
||||
namespace profiler_gui {
|
||||
|
||||
@ -64,4 +64,4 @@ namespace profiler_gui {
|
||||
|
||||
} // END of namespace profiler_gui.
|
||||
|
||||
#endif // EASY__GLOBALS_QOBJECTS_H___
|
||||
#endif // EASY_GLOBALS_QOBJECTS_H
|
||||
|
@ -40,11 +40,10 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <QApplication>
|
||||
//#include <QTreeView>
|
||||
//#include <QFileSystemModel>
|
||||
//#include "treemodel.h"
|
||||
|
||||
#include "main_window.h"
|
||||
#include "easy/reader.h"
|
||||
|
||||
#include <easy/reader.h>
|
||||
|
||||
|
||||
#if defined(_WIN32) && defined (_BUILD_RELEASE_)
|
||||
|
@ -87,7 +87,8 @@
|
||||
#include "blocks_graphics_view.h"
|
||||
#include "descriptors_tree_widget.h"
|
||||
#include "globals.h"
|
||||
#include "easy/easy_net.h"
|
||||
|
||||
#include <easy/easy_net.h>
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
|
@ -53,8 +53,8 @@
|
||||
#include <QTimer>
|
||||
#include <QStringList>
|
||||
|
||||
#include "easy/easy_socket.h"
|
||||
#include "easy/reader.h"
|
||||
#include <easy/easy_socket.h>
|
||||
#include <easy/reader.h>
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
|
@ -44,12 +44,13 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__TREE_WIDGET_ITEM__H_
|
||||
#define EASY__TREE_WIDGET_ITEM__H_
|
||||
#ifndef EASY_TREE_WIDGET_ITEM_H
|
||||
#define EASY_TREE_WIDGET_ITEM_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <QTreeWidget>
|
||||
#include "easy/reader.h"
|
||||
#include <easy/reader.h>
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -148,4 +149,4 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__TREE_WIDGET_ITEM__H_
|
||||
#endif // EASY_TREE_WIDGET_ITEM_H
|
||||
|
@ -44,15 +44,16 @@
|
||||
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
||||
************************************************************************/
|
||||
|
||||
#ifndef EASY__TREE_WIDGET_LOADER__H_
|
||||
#define EASY__TREE_WIDGET_LOADER__H_
|
||||
#ifndef EASY_TREE_WIDGET_LOADER_H
|
||||
#define EASY_TREE_WIDGET_LOADER_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
//#include <unordered_set>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include "easy/reader.h"
|
||||
|
||||
#include <easy/reader.h>
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -122,4 +123,4 @@ private:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // EASY__TREE_WIDGET_LOADER__H_
|
||||
#endif // EASY_TREE_WIDGET_LOADER_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "easy/profiler.h"
|
||||
#include "easy/reader.h"
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/reader.h>
|
||||
#include <fstream>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
|
@ -1,14 +1,15 @@
|
||||
//#define FULL_DISABLE_PROFILER
|
||||
#include "easy/profiler.h"
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <condition_variable>
|
||||
#include "easy/reader.h"
|
||||
#include <cstdlib>
|
||||
#include <math.h>
|
||||
|
||||
#include <easy/profiler.h>
|
||||
#include <easy/reader.h>
|
||||
|
||||
std::condition_variable cv;
|
||||
std::mutex cv_m;
|
||||
int g_i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user