mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: add inside guards to prevent stray includes
This requires that things use #include <sysprof.h> now instead of individual includes. A few cases are still allowed in the libsysprof-capture library to make copy/paste embedding easier.
This commit is contained in:
@ -21,10 +21,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include <sysprof.h>
|
||||||
#include "sysprof-callgraph-profile.h"
|
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "sysprof-capture-condition.h"
|
#include <sysprof.h>
|
||||||
#include "sysprof-capture-cursor.h"
|
|
||||||
#include "sysprof-color-cycle.h"
|
#include "sysprof-color-cycle.h"
|
||||||
#include "sysprof-cpu-visualizer-row.h"
|
#include "sysprof-cpu-visualizer-row.h"
|
||||||
|
|
||||||
|
|||||||
@ -21,9 +21,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include <sysprof.h>
|
||||||
#include "sysprof-profiler.h"
|
|
||||||
#include "sysprof-version-macros.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|||||||
@ -24,10 +24,9 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sysprof.h>
|
||||||
|
|
||||||
#include "pointcache.h"
|
#include "pointcache.h"
|
||||||
#include "sysprof-capture-condition.h"
|
|
||||||
#include "sysprof-capture-cursor.h"
|
|
||||||
#include "sysprof-line-visualizer-row.h"
|
#include "sysprof-line-visualizer-row.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
@ -18,6 +18,8 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define G_LOG_DOMAIN "sysprof-process-model-row"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "sysprof-process-model-row.h"
|
#include "sysprof-process-model-row.h"
|
||||||
|
|||||||
@ -21,9 +21,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include <sysprof.h>
|
||||||
#include "sysprof-process-model-item.h"
|
|
||||||
#include "sysprof-version-macros.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|||||||
@ -22,10 +22,9 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sysprof.h>
|
||||||
|
|
||||||
#include "sysprof-model-filter.h"
|
#include "sysprof-model-filter.h"
|
||||||
#include "sysprof-process-model.h"
|
|
||||||
#include "sysprof-process-model-item.h"
|
|
||||||
#include "sysprof-process-model-row.h"
|
#include "sysprof-process-model-row.h"
|
||||||
#include "sysprof-profiler-menu-button.h"
|
#include "sysprof-profiler-menu-button.h"
|
||||||
|
|
||||||
|
|||||||
@ -21,9 +21,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include <sysprof.h>
|
||||||
#include "sysprof-profiler.h"
|
|
||||||
#include "sysprof-version-macros.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,6 @@ G_BEGIN_DECLS
|
|||||||
# include "sysprof-model-filter.h"
|
# include "sysprof-model-filter.h"
|
||||||
# include "sysprof-multi-paned.h"
|
# include "sysprof-multi-paned.h"
|
||||||
# include "sysprof-recording-state-view.h"
|
# include "sysprof-recording-state-view.h"
|
||||||
# include "sysprof-process-model.h"
|
|
||||||
# include "sysprof-process-model-item.h"
|
|
||||||
# include "sysprof-process-model-row.h"
|
# include "sysprof-process-model-row.h"
|
||||||
# include "sysprof-profiler-menu-button.h"
|
# include "sysprof-profiler-menu-button.h"
|
||||||
# include "sysprof-visualizer-row.h"
|
# include "sysprof-visualizer-row.h"
|
||||||
|
|||||||
@ -28,7 +28,6 @@
|
|||||||
#include "sysprof-visualizer-list.h"
|
#include "sysprof-visualizer-list.h"
|
||||||
#include "sysprof-visualizer-row.h"
|
#include "sysprof-visualizer-row.h"
|
||||||
#include "sysprof-visualizer-row-private.h"
|
#include "sysprof-visualizer-row-private.h"
|
||||||
#include "sysprof-selection.h"
|
|
||||||
#include "sysprof-visualizer-ticks.h"
|
#include "sysprof-visualizer-ticks.h"
|
||||||
#include "sysprof-visualizer-view.h"
|
#include "sysprof-visualizer-view.h"
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-profile.h"
|
#include "sysprof-profile.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-symbol-resolver.h"
|
#include "sysprof-symbol-resolver.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-source.h"
|
#include "sysprof-source.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-source.h"
|
#include "sysprof-source.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-symbol-resolver.h"
|
#include "sysprof-symbol-resolver.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-symbol-resolver.h"
|
#include "sysprof-symbol-resolver.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-capture-types.h"
|
#include "sysprof-capture-types.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-profiler.h"
|
#include "sysprof-profiler.h"
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "sysprof-capture-types.h"
|
#include "sysprof-capture-types.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-source.h"
|
#include "sysprof-source.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-source.h"
|
#include "sysprof-source.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-source.h"
|
#include "sysprof-source.h"
|
||||||
|
|||||||
@ -18,11 +18,14 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define G_LOG_DOMAIN "sp-process-model-item"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sysprof-process-model-item.h"
|
#include "sysprof-process-model-item.h"
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
# include "sysprof-proc-source.h"
|
# include "sysprof-proc-source.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include "sysprof-capture-writer.h"
|
#include "sysprof-capture-writer.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include "sysprof-capture-writer.h"
|
#include "sysprof-capture-writer.h"
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sysprof-version-macros.h"
|
#include "sysprof-version-macros.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|||||||
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined (SYSPROF_INSIDE) && !defined (SYSPROF_COMPILATION)
|
||||||
|
# error "Only <sysprof.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include "sysprof-address.h"
|
#include "sysprof-address.h"
|
||||||
|
|||||||
@ -31,6 +31,8 @@ G_BEGIN_DECLS
|
|||||||
# include "sysprof-profile.h"
|
# include "sysprof-profile.h"
|
||||||
# include "sysprof-profiler.h"
|
# include "sysprof-profiler.h"
|
||||||
# include "sysprof-map-lookaside.h"
|
# include "sysprof-map-lookaside.h"
|
||||||
|
# include "sysprof-process-model.h"
|
||||||
|
# include "sysprof-process-model-item.h"
|
||||||
# include "sysprof-source.h"
|
# include "sysprof-source.h"
|
||||||
# include "sysprof-elf-symbol-resolver.h"
|
# include "sysprof-elf-symbol-resolver.h"
|
||||||
# include "sysprof-jitmap-symbol-resolver.h"
|
# include "sysprof-jitmap-symbol-resolver.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user