[sysprof/wip/chergert/sysprof-3] libsysprof: add versioning macros



commit b5637193f289da53c5f1c0b597ce40cb9a9a5e7e
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 8 10:55:29 2019 -0700

    libsysprof: add versioning macros
    
    This also moves stackstash.[ch] into a location that can be
    embedded by both the libsysprof and libsysprof-ui code. We
    pass native pointers to the structure as a gpointer in the
    public API to allow for this. The performance of that code is
    incredibly sensitive to the interactivity of Sysprof.

 src/libsysprof-ui/meson.build                 |  1 +
 src/libsysprof-ui/sp-callgraph-view.c         |  5 +++-
 src/libsysprof/demangle.h                     |  7 ++----
 src/libsysprof/elfparser.h                    |  1 -
 src/libsysprof/meson.build                    | 16 +++++++------
 src/libsysprof/sp-callgraph-profile-private.h | 31 -------------------------
 src/libsysprof/sp-callgraph-profile.c         | 14 ++++++++----
 src/libsysprof/sp-callgraph-profile.h         | 17 ++++++++++----
 src/libsysprof/sp-capture-gobject.c           |  4 ++++
 src/libsysprof/sp-capture-gobject.h           |  6 ++++-
 src/libsysprof/sp-elf-symbol-resolver.c       |  8 +++++--
 src/libsysprof/sp-elf-symbol-resolver.h       | 13 +++++++----
 src/libsysprof/sp-gjs-source.c                |  6 ++++-
 src/libsysprof/sp-gjs-source.h                |  9 ++++----
 src/libsysprof/sp-hostinfo-source.c           |  6 ++++-
 src/libsysprof/sp-hostinfo-source.h           | 14 +++++++-----
 src/libsysprof/sp-jitmap-symbol-resolver.c    |  6 ++++-
 src/libsysprof/sp-jitmap-symbol-resolver.h    |  9 ++++----
 src/libsysprof/sp-kallsyms.c                  |  2 ++
 src/libsysprof/sp-kernel-symbol-resolver.c    |  6 ++++-
 src/libsysprof/sp-kernel-symbol-resolver.h    |  9 ++++----
 src/libsysprof/sp-kernel-symbol.c             |  4 +++-
 src/libsysprof/sp-kernel-symbol.h             |  9 ++++----
 src/libsysprof/sp-line-reader.c               |  2 ++
 src/libsysprof/sp-local-profiler.c            |  6 ++++-
 src/libsysprof/sp-local-profiler.h            | 13 +++++++----
 src/libsysprof/sp-map-lookaside.c             |  6 ++++-
 src/libsysprof/sp-map-lookaside.h             |  9 ++++----
 src/libsysprof/sp-memory-source.c             |  6 ++---
 src/libsysprof/sp-memory-source.h             |  6 ++++-
 src/libsysprof/sp-perf-counter.c              |  4 +++-
 src/libsysprof/sp-perf-counter.h              |  9 ++++----
 src/libsysprof/sp-perf-source.c               |  4 +++-
 src/libsysprof/sp-perf-source.h               | 14 ++++++++----
 src/libsysprof/sp-proc-source.c               |  6 ++++-
 src/libsysprof/sp-proc-source.h               | 14 ++++++++----
 src/libsysprof/sp-process-model-item.c        |  6 ++++-
 src/libsysprof/sp-process-model-item.h        | 19 +++++++++++----
 src/libsysprof/sp-process-model.c             |  6 ++++-
 src/libsysprof/sp-process-model.h             | 15 ++++++++----
 src/libsysprof/sp-profile.c                   |  6 ++++-
 src/libsysprof/sp-profile.h                   | 15 ++++++++----
 src/libsysprof/sp-profiler.c                  |  8 ++++++-
 src/libsysprof/sp-profiler.h                  | 33 +++++++++++++++++++++++----
 src/libsysprof/sp-selection.c                 |  6 ++++-
 src/libsysprof/sp-selection.h                 | 19 +++++++++++----
 src/libsysprof/sp-source-util.c               |  2 ++
 src/libsysprof/sp-source.c                    |  6 ++++-
 src/libsysprof/sp-source.h                    |  9 ++++----
 src/libsysprof/sp-symbol-dirs.c               |  4 +++-
 src/libsysprof/sp-symbol-dirs.h               |  9 ++++----
 src/libsysprof/sp-symbol-resolver.c           |  6 ++++-
 src/libsysprof/sp-symbol-resolver.h           |  9 ++++----
 src/libsysprof/sysprof.h                      |  2 +-
 src/{libsysprof => }/stackstash.c             |  0
 src/{libsysprof => }/stackstash.h             |  0
 56 files changed, 305 insertions(+), 177 deletions(-)
---
diff --git a/src/libsysprof-ui/meson.build b/src/libsysprof-ui/meson.build
index 3789dcc..6c5c9b4 100644
--- a/src/libsysprof-ui/meson.build
+++ b/src/libsysprof-ui/meson.build
@@ -23,6 +23,7 @@ libsysprof_ui_private_sources = [
   'rectangles.c',
   'sp-cell-renderer-percent.c',
   'sp-theme-manager.c',
+  '../stackstash.c',
 ]
 
 libsysprof_ui_public_headers = [
diff --git a/src/libsysprof-ui/sp-callgraph-view.c b/src/libsysprof-ui/sp-callgraph-view.c
index 2385ff0..b9e0bd7 100644
--- a/src/libsysprof-ui/sp-callgraph-view.c
+++ b/src/libsysprof-ui/sp-callgraph-view.c
@@ -37,9 +37,12 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
+
 #include <glib/gi18n.h>
 
-#include "sp-callgraph-profile-private.h"
+#include "../stackstash.h"
+
 #include "sp-callgraph-view.h"
 #include "sp-cell-renderer-percent.h"
 
diff --git a/src/libsysprof/demangle.h b/src/libsysprof/demangle.h
index bbd482d..7a00586 100644
--- a/src/libsysprof/demangle.h
+++ b/src/libsysprof/demangle.h
@@ -1,6 +1,6 @@
 /* demangle.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -16,8 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef DEMANGLE_H
-#define DEMANGLE_H
+#pragma once
 
 #include <glib.h>
 
@@ -26,5 +25,3 @@ G_BEGIN_DECLS
 gchar *sysprof_cplus_demangle (const gchar *name);
 
 G_END_DECLS
-
-#endif /* DEMANGLE_H */
diff --git a/src/libsysprof/elfparser.h b/src/libsysprof/elfparser.h
index c01274c..17986e7 100644
--- a/src/libsysprof/elfparser.h
+++ b/src/libsysprof/elfparser.h
@@ -54,4 +54,3 @@ gulong        elf_parser_get_sym_address (ElfParser     *parser,
 gboolean      elf_parser_owns_symbol     (ElfParser     *parser,
                                          const ElfSym  *sym);
 char *        elf_demangle               (const char    *name);
-
diff --git a/src/libsysprof/meson.build b/src/libsysprof/meson.build
index 2186d09..91a9148 100644
--- a/src/libsysprof/meson.build
+++ b/src/libsysprof/meson.build
@@ -23,7 +23,6 @@ libsysprof_public_sources = [
 
 libsysprof_public_headers = [
   'sp-callgraph-profile.h',
-  'sp-callgraph-profile-private.h',
   'sp-capture-gobject.h',
   'sp-elf-symbol-resolver.h',
   'sp-hostinfo-source.h',
@@ -45,10 +44,10 @@ libsysprof_public_headers = [
 ]
 
 libsysprof_private_sources = [
+  '../stackstash.c',
   'binfile.c',
   'demangle.cpp',
   'elfparser.c',
-  'stackstash.c',
   'sp-source-util.c',
   'sp-line-reader.c',
 ]
@@ -90,12 +89,15 @@ if get_option('with_sysprofd') != 'none'
   libsysprof_deps += dependency('polkit-gobject-1')
 endif
 
-libsysprof = shared_library('sysprof-@0@'.format(libsysprof_api_version),
+libsysprof = shared_library(
+  'sysprof-@0@'.format(libsysprof_api_version),
   libsysprof_public_sources + libsysprof_private_sources,
-  dependencies: libsysprof_deps,
-        c_args: libsysprof_c_args,
-       install: true,
-   install_dir: get_option('libdir'),
+
+           dependencies: libsysprof_deps,
+                 c_args: libsysprof_c_args,
+                install: true,
+            install_dir: get_option('libdir'),
+  gnu_symbol_visibility: 'hidden',
 )
 
 libsysprof_dep = declare_dependency(
diff --git a/src/libsysprof/sp-callgraph-profile.c b/src/libsysprof/sp-callgraph-profile.c
index 119ebb9..2707bb3 100644
--- a/src/libsysprof/sp-callgraph-profile.c
+++ b/src/libsysprof/sp-callgraph-profile.c
@@ -1,6 +1,6 @@
 /* sp-callgraph-profile.c
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,6 +14,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/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 /* Sysprof -- Sampling, systemwide CPU profiler
@@ -34,20 +36,22 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
+
 #include <glib/gi18n.h>
 #include <string.h>
 #include <sysprof-capture.h>
 #include <unistd.h>
 
+#include "../stackstash.h"
+
 #include "sp-callgraph-profile.h"
-#include "sp-callgraph-profile-private.h"
 #include "sp-capture-reader.h"
 #include "sp-elf-symbol-resolver.h"
 #include "sp-jitmap-symbol-resolver.h"
-#include "sp-map-lookaside.h"
 #include "sp-kernel-symbol-resolver.h"
+#include "sp-map-lookaside.h"
 #include "sp-selection.h"
-#include "stackstash.h"
 
 #define CHECK_CANCELLABLE_INTERVAL 100
 
@@ -499,7 +503,7 @@ profile_iface_init (SpProfileInterface *iface)
   iface->set_reader = sp_callgraph_profile_set_reader;
 }
 
-StackStash *
+gpointer
 sp_callgraph_profile_get_stash (SpCallgraphProfile *self)
 {
   g_return_val_if_fail (SP_IS_CALLGRAPH_PROFILE (self), NULL);
diff --git a/src/libsysprof/sp-callgraph-profile.h b/src/libsysprof/sp-callgraph-profile.h
index 0ff02a1..951908f 100644
--- a/src/libsysprof/sp-callgraph-profile.h
+++ b/src/libsysprof/sp-callgraph-profile.h
@@ -1,6 +1,6 @@
 /* sp-callgraph-profile.h
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_CALLGRAPH_PROFILE_H
-#define SP_CALLGRAPH_PROFILE_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include "sp-profile.h"
 #include "sp-selection.h"
@@ -26,13 +29,17 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_CALLGRAPH_PROFILE (sp_callgraph_profile_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpCallgraphProfile, sp_callgraph_profile, SP, CALLGRAPH_PROFILE, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpProfile *sp_callgraph_profile_new                (void);
+SYSPROF_AVAILABLE_IN_ALL
 SpProfile *sp_callgraph_profile_new_with_selection (SpSelection        *selection);
+SYSPROF_AVAILABLE_IN_ALL
+gpointer sp_callgraph_profile_get_stash            (SpCallgraphProfile *self);
+SYSPROF_AVAILABLE_IN_ALL
 GQuark     sp_callgraph_profile_get_tag            (SpCallgraphProfile *self,
                                                     const gchar        *symbol);
 
 G_END_DECLS
-
-#endif /* SP_CALLGRAPH_PROFILE_H */
diff --git a/src/libsysprof/sp-capture-gobject.c b/src/libsysprof/sp-capture-gobject.c
index 9fa0294..f6717df 100644
--- a/src/libsysprof/sp-capture-gobject.c
+++ b/src/libsysprof/sp-capture-gobject.c
@@ -18,8 +18,12 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-capture-gobject.h"
 
+#include <sysprof-capture.h>
+
 G_DEFINE_BOXED_TYPE (SpCaptureReader, sp_capture_reader, (GBoxedCopyFunc)sp_capture_reader_ref, 
(GBoxedFreeFunc)sp_capture_reader_unref)
 G_DEFINE_BOXED_TYPE (SpCaptureWriter, sp_capture_writer, (GBoxedCopyFunc)sp_capture_writer_ref, 
(GBoxedFreeFunc)sp_capture_writer_unref)
 G_DEFINE_BOXED_TYPE (SpCaptureCursor, sp_capture_cursor, (GBoxedCopyFunc)sp_capture_cursor_ref, 
(GBoxedFreeFunc)sp_capture_cursor_unref)
diff --git a/src/libsysprof/sp-capture-gobject.h b/src/libsysprof/sp-capture-gobject.h
index 540da2f..c7b791b 100644
--- a/src/libsysprof/sp-capture-gobject.h
+++ b/src/libsysprof/sp-capture-gobject.h
@@ -21,7 +21,8 @@
 #pragma once
 
 #include <glib-object.h>
-#include <sysprof-capture.h>
+
+#include "sysprof-version-macros.h"
 
 G_BEGIN_DECLS
 
@@ -29,8 +30,11 @@ G_BEGIN_DECLS
 #define SP_TYPE_CAPTURE_WRITER (sp_capture_writer_get_type())
 #define SP_TYPE_CAPTURE_CURSOR (sp_capture_cursor_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 GType sp_capture_reader_get_type (void);
+SYSPROF_AVAILABLE_IN_ALL
 GType sp_capture_writer_get_type (void);
+SYSPROF_AVAILABLE_IN_ALL
 GType sp_capture_cursor_get_type (void);
 
 G_END_DECLS
diff --git a/src/libsysprof/sp-elf-symbol-resolver.c b/src/libsysprof/sp-elf-symbol-resolver.c
index c967aaf..a62f21e 100644
--- a/src/libsysprof/sp-elf-symbol-resolver.c
+++ b/src/libsysprof/sp-elf-symbol-resolver.c
@@ -1,6 +1,6 @@
 /* sp-elf-symbol-resolver.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,13 +14,17 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <string.h>
 
-#include "sp-elf-symbol-resolver.h"
 #include "binfile.h"
 #include "elfparser.h"
+#include "sp-elf-symbol-resolver.h"
 #include "sp-map-lookaside.h"
 
 struct _SpElfSymbolResolver
diff --git a/src/libsysprof/sp-elf-symbol-resolver.h b/src/libsysprof/sp-elf-symbol-resolver.h
index 659c6ee..f87e701 100644
--- a/src/libsysprof/sp-elf-symbol-resolver.h
+++ b/src/libsysprof/sp-elf-symbol-resolver.h
@@ -1,6 +1,6 @@
 /* sp-elf-symbol-resolver.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_ELF_SYMBOL_RESOLVER_H
-#define SP_ELF_SYMBOL_RESOLVER_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include "sp-symbol-resolver.h"
 
@@ -25,10 +28,10 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_ELF_SYMBOL_RESOLVER (sp_elf_symbol_resolver_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpElfSymbolResolver, sp_elf_symbol_resolver, SP, ELF_SYMBOL_RESOLVER, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpSymbolResolver *sp_elf_symbol_resolver_new (void);
 
 G_END_DECLS
-
-#endif /* SP_ELF_SYMBOL_RESOLVER_H */
diff --git a/src/libsysprof/sp-gjs-source.c b/src/libsysprof/sp-gjs-source.c
index 615fe7e..065d491 100644
--- a/src/libsysprof/sp-gjs-source.c
+++ b/src/libsysprof/sp-gjs-source.c
@@ -1,6 +1,6 @@
 /* sp-gjs-source.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <signal.h>
 #include <string.h>
 
diff --git a/src/libsysprof/sp-gjs-source.h b/src/libsysprof/sp-gjs-source.h
index 94836c3..fe98ee1 100644
--- a/src/libsysprof/sp-gjs-source.h
+++ b/src/libsysprof/sp-gjs-source.h
@@ -1,6 +1,6 @@
 /* sp-gjs-source.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_GJS_SOURCE_H
-#define SP_GJS_SOURCE_H
+#pragma once
 
 #include "sp-source.h"
 
@@ -30,5 +31,3 @@ G_DECLARE_FINAL_TYPE (SpGjsSource, sp_gjs_source, SP, GJS_SOURCE, GObject)
 SpSource *sp_gjs_source_new (void);
 
 G_END_DECLS
-
-#endif /* SP_GJS_SOURCE_H */
diff --git a/src/libsysprof/sp-hostinfo-source.c b/src/libsysprof/sp-hostinfo-source.c
index 972978f..af15320 100644
--- a/src/libsysprof/sp-hostinfo-source.c
+++ b/src/libsysprof/sp-hostinfo-source.c
@@ -1,6 +1,6 @@
 /* sp-hostinfo-source.c
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <ctype.h>
 #include <fcntl.h>
 #include <stdio.h>
diff --git a/src/libsysprof/sp-hostinfo-source.h b/src/libsysprof/sp-hostinfo-source.h
index 2bd4a75..b4468a4 100644
--- a/src/libsysprof/sp-hostinfo-source.h
+++ b/src/libsysprof/sp-hostinfo-source.h
@@ -1,6 +1,6 @@
 /* sp-hostinfo-source.h
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_HOSTINFO_SOURCE_H
-#define SP_HOSTINFO_SOURCE_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include "sp-source.h"
 
@@ -25,11 +28,10 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_HOSTINFO_SOURCE (sp_hostinfo_source_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpHostinfoSource, sp_hostinfo_source, SP, HOSTINFO_SOURCE, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpSource *sp_hostinfo_source_new (void);
 
 G_END_DECLS
-
-#endif /* SP_HOSTINFO_SOURCE_H */
-
diff --git a/src/libsysprof/sp-jitmap-symbol-resolver.c b/src/libsysprof/sp-jitmap-symbol-resolver.c
index fccd2b1..2f3c454 100644
--- a/src/libsysprof/sp-jitmap-symbol-resolver.c
+++ b/src/libsysprof/sp-jitmap-symbol-resolver.c
@@ -1,6 +1,6 @@
 /* sp-jitmap-symbol-resolver.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-kernel-symbol.h"
 #include "sp-jitmap-symbol-resolver.h"
 
diff --git a/src/libsysprof/sp-jitmap-symbol-resolver.h b/src/libsysprof/sp-jitmap-symbol-resolver.h
index daf32b1..e1c6abd 100644
--- a/src/libsysprof/sp-jitmap-symbol-resolver.h
+++ b/src/libsysprof/sp-jitmap-symbol-resolver.h
@@ -1,6 +1,6 @@
 /* sp-jitmap-symbol-resolver.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_JITMAP_SYMBOL_RESOLVER_H
-#define SP_JITMAP_SYMBOL_RESOLVER_H
+#pragma once
 
 #include "sp-symbol-resolver.h"
 
@@ -30,5 +31,3 @@ G_DECLARE_FINAL_TYPE (SpJitmapSymbolResolver, sp_jitmap_symbol_resolver, SP, JIT
 SpSymbolResolver *sp_jitmap_symbol_resolver_new (void);
 
 G_END_DECLS
-
-#endif /* SP_JITMAP_SYMBOL_RESOLVER_H */
diff --git a/src/libsysprof/sp-kallsyms.c b/src/libsysprof/sp-kallsyms.c
index 7a4b0d4..c8a0e05 100644
--- a/src/libsysprof/sp-kallsyms.c
+++ b/src/libsysprof/sp-kallsyms.c
@@ -20,6 +20,8 @@
 
 #define G_LOG_DOMAIN "sp-kallsyms"
 
+#include "config.h"
+
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE
 #endif
diff --git a/src/libsysprof/sp-kernel-symbol-resolver.c b/src/libsysprof/sp-kernel-symbol-resolver.c
index 8d38e2e..672ade1 100644
--- a/src/libsysprof/sp-kernel-symbol-resolver.c
+++ b/src/libsysprof/sp-kernel-symbol-resolver.c
@@ -1,6 +1,6 @@
 /* sp-kernel-symbol-resolver.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-kernel-symbol.h"
 #include "sp-kernel-symbol-resolver.h"
 
diff --git a/src/libsysprof/sp-kernel-symbol-resolver.h b/src/libsysprof/sp-kernel-symbol-resolver.h
index e1c0c9c..b9d722b 100644
--- a/src/libsysprof/sp-kernel-symbol-resolver.h
+++ b/src/libsysprof/sp-kernel-symbol-resolver.h
@@ -1,6 +1,6 @@
 /* sp-kernel-symbol-resolver.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_KERNEL_SYMBOL_RESOLVER_H
-#define SP_KERNEL_SYMBOL_RESOLVER_H
+#pragma once
 
 #include "sp-symbol-resolver.h"
 
@@ -30,5 +31,3 @@ G_DECLARE_FINAL_TYPE (SpKernelSymbolResolver, sp_kernel_symbol_resolver, SP, KER
 SpSymbolResolver *sp_kernel_symbol_resolver_new (void);
 
 G_END_DECLS
-
-#endif /* SP_KERNEL_SYMBOL_RESOLVER_H */
diff --git a/src/libsysprof/sp-kernel-symbol.c b/src/libsysprof/sp-kernel-symbol.c
index 37f8c69..ee780a3 100644
--- a/src/libsysprof/sp-kernel-symbol.c
+++ b/src/libsysprof/sp-kernel-symbol.c
@@ -1,6 +1,6 @@
 /* sp-kernel-symbol.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,6 +14,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/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 #define G_LOG_DOMAIN "sp-kernel-symbol"
diff --git a/src/libsysprof/sp-kernel-symbol.h b/src/libsysprof/sp-kernel-symbol.h
index b2b7364..5e83f2c 100644
--- a/src/libsysprof/sp-kernel-symbol.h
+++ b/src/libsysprof/sp-kernel-symbol.h
@@ -1,6 +1,6 @@
 /* sp-kernel-symbol.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_KERNEL_SYMBOL_H
-#define SP_KERNEL_SYMBOL_H
+#pragma once
 
 #include "sp-capture-types.h"
 
@@ -32,5 +33,3 @@ typedef struct
 const SpKernelSymbol *sp_kernel_symbol_from_address (SpCaptureAddress address);
 
 G_END_DECLS
-
-#endif /* SP_KERNEL_SYMBOL_H */
diff --git a/src/libsysprof/sp-line-reader.c b/src/libsysprof/sp-line-reader.c
index a61c537..f39885f 100644
--- a/src/libsysprof/sp-line-reader.c
+++ b/src/libsysprof/sp-line-reader.c
@@ -18,6 +18,8 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <string.h>
 
 #include "sp-line-reader.h"
diff --git a/src/libsysprof/sp-local-profiler.c b/src/libsysprof/sp-local-profiler.c
index 47b5f53..f0460d0 100644
--- a/src/libsysprof/sp-local-profiler.c
+++ b/src/libsysprof/sp-local-profiler.c
@@ -1,6 +1,6 @@
 /* sp-local-profiler.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <errno.h>
diff --git a/src/libsysprof/sp-local-profiler.h b/src/libsysprof/sp-local-profiler.h
index 2acffdd..58cd806 100644
--- a/src/libsysprof/sp-local-profiler.h
+++ b/src/libsysprof/sp-local-profiler.h
@@ -1,6 +1,6 @@
 /* sp-local-profiler.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,17 +14,21 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_LOCAL_PROFILER_H
-#define SP_LOCAL_PROFILER_H
+#pragma once
 
 #include "sp-profiler.h"
 
+#include "sysprof-version-macros.h"
+
 G_BEGIN_DECLS
 
 #define SP_TYPE_LOCAL_PROFILER (sp_local_profiler_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_DERIVABLE_TYPE (SpLocalProfiler, sp_local_profiler, SP, LOCAL_PROFILER, GObject)
 
 struct _SpLocalProfilerClass
@@ -33,8 +37,7 @@ struct _SpLocalProfilerClass
   gpointer     padding[8];
 };
 
+SYSPROF_AVAILABLE_IN_ALL
 SpProfiler *sp_local_profiler_new (void);
 
 G_END_DECLS
-
-#endif /* SP_LOCAL_PROFILER_H */
diff --git a/src/libsysprof/sp-map-lookaside.c b/src/libsysprof/sp-map-lookaside.c
index 0a9231d..7b634e5 100644
--- a/src/libsysprof/sp-map-lookaside.c
+++ b/src/libsysprof/sp-map-lookaside.c
@@ -1,6 +1,6 @@
 /* sp-map-lookaside.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-map-lookaside.h"
 
 struct _SpMapLookaside
diff --git a/src/libsysprof/sp-map-lookaside.h b/src/libsysprof/sp-map-lookaside.h
index 5de7bdb..34c85ec 100644
--- a/src/libsysprof/sp-map-lookaside.h
+++ b/src/libsysprof/sp-map-lookaside.h
@@ -1,6 +1,6 @@
 /* sp-map-lookaside.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_MAP_LOOKASIDE_H
-#define SP_MAP_LOOKASIDE_H
+#pragma once
 
 #include <glib.h>
 
@@ -46,5 +47,3 @@ void            sp_map_lookaside_free   (SpMapLookaside *self);
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (SpMapLookaside, sp_map_lookaside_free)
 
 G_END_DECLS
-
-#endif /* SP_MAP_LOOKASIDE_H */
diff --git a/src/libsysprof/sp-memory-source.c b/src/libsysprof/sp-memory-source.c
index 44a21ce..1347fe3 100644
--- a/src/libsysprof/sp-memory-source.c
+++ b/src/libsysprof/sp-memory-source.c
@@ -1,6 +1,6 @@
 /* sp-memory-source.c
  *
- * Copyright 2018 Christian Hergert <chergert redhat com>
+ * Copyright 2018-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,10 +18,10 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#include "config.h"
-
 #define G_LOG_DOMAIN "sp-memory-source"
 
+#include "config.h"
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
diff --git a/src/libsysprof/sp-memory-source.h b/src/libsysprof/sp-memory-source.h
index a3aa29f..c020392 100644
--- a/src/libsysprof/sp-memory-source.h
+++ b/src/libsysprof/sp-memory-source.h
@@ -1,6 +1,6 @@
 /* sp-memory-source.h
  *
- * Copyright 2018 Christian Hergert <chergert redhat com>
+ * Copyright 2018-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,14 +20,18 @@
 
 #pragma once
 
+#include "sysprof-version-macros.h"
+
 #include "sp-source.h"
 
 G_BEGIN_DECLS
 
 #define SP_TYPE_MEMORY_SOURCE (sp_memory_source_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpMemorySource, sp_memory_source, SP, MEMORY_SOURCE, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpSource *sp_memory_source_new (void);
 
 G_END_DECLS
diff --git a/src/libsysprof/sp-perf-counter.c b/src/libsysprof/sp-perf-counter.c
index 65f5728..0accf95 100644
--- a/src/libsysprof/sp-perf-counter.c
+++ b/src/libsysprof/sp-perf-counter.c
@@ -1,6 +1,6 @@
 /* sp-perf-counter.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,6 +14,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/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 /* Sysprof -- Sampling, systemwide CPU profiler
diff --git a/src/libsysprof/sp-perf-counter.h b/src/libsysprof/sp-perf-counter.h
index f20fce9..141c140 100644
--- a/src/libsysprof/sp-perf-counter.h
+++ b/src/libsysprof/sp-perf-counter.h
@@ -1,6 +1,6 @@
 /* sp-perf-counter.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PERF_COUNTER_H
-#define SP_PERF_COUNTER_H
+#pragma once
 
 #include <gio/gio.h>
 #include <linux/perf_event.h>
@@ -150,5 +151,3 @@ SpPerfCounter *sp_perf_counter_ref          (SpPerfCounter          *self);
 void           sp_perf_counter_unref        (SpPerfCounter          *self);
 
 G_END_DECLS
-
-#endif /* SP_PERF_COUNTER_H */
diff --git a/src/libsysprof/sp-perf-source.c b/src/libsysprof/sp-perf-source.c
index f231da4..9ae3b80 100644
--- a/src/libsysprof/sp-perf-source.c
+++ b/src/libsysprof/sp-perf-source.c
@@ -1,6 +1,6 @@
 /* sp-perf-source.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,6 +14,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/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 /* Sysprof -- Sampling, systemwide CPU profiler
diff --git a/src/libsysprof/sp-perf-source.h b/src/libsysprof/sp-perf-source.h
index b52d5c2..1be7989 100644
--- a/src/libsysprof/sp-perf-source.h
+++ b/src/libsysprof/sp-perf-source.h
@@ -1,6 +1,6 @@
 /* sp-perf-source.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PERF_SOURCE_H
-#define SP_PERF_SOURCE_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include "sp-source.h"
 
@@ -25,12 +28,13 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_PERF_SOURCE (sp_perf_source_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpPerfSource, sp_perf_source, SP, PERF_SOURCE, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpSource *sp_perf_source_new            (void);
+SYSPROF_AVAILABLE_IN_ALL
 void      sp_perf_source_set_target_pid (SpPerfSource *self,
                                          GPid          pid);
 
 G_END_DECLS
-
-#endif /* SP_PERF_SOURCE_H */
diff --git a/src/libsysprof/sp-proc-source.c b/src/libsysprof/sp-proc-source.c
index 4edd176..80e48ed 100644
--- a/src/libsysprof/sp-proc-source.c
+++ b/src/libsysprof/sp-proc-source.c
@@ -1,6 +1,6 @@
 /* sp-proc-source.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,6 +14,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/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 /* Sysprof -- Sampling, systemwide CPU profiler
@@ -35,6 +37,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/src/libsysprof/sp-proc-source.h b/src/libsysprof/sp-proc-source.h
index 7d1bce8..bdfd7dd 100644
--- a/src/libsysprof/sp-proc-source.h
+++ b/src/libsysprof/sp-proc-source.h
@@ -1,6 +1,6 @@
 /* sp-proc-source.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PROC_SOURCE_H
-#define SP_PROC_SOURCE_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include "sp-source.h"
 
@@ -25,12 +28,13 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_PROC_SOURCE (sp_proc_source_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpProcSource, sp_proc_source, SP, PROC_SOURCE, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpSource *sp_proc_source_new              (void);
+SYSPROF_AVAILABLE_IN_ALL
 gchar    *sp_proc_source_get_command_line (GPid          pid,
                                            gboolean     *is_kernel);
 
 G_END_DECLS
-
-#endif /* SP_PROC_SOURCE_H */
diff --git a/src/libsysprof/sp-process-model-item.c b/src/libsysprof/sp-process-model-item.c
index 61cbaf5..00b5b79 100644
--- a/src/libsysprof/sp-process-model-item.c
+++ b/src/libsysprof/sp-process-model-item.c
@@ -1,6 +1,6 @@
 /* sp-process-model-item.c
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <string.h>
 
 #include "sp-process-model-item.h"
diff --git a/src/libsysprof/sp-process-model-item.h b/src/libsysprof/sp-process-model-item.h
index ec5b0e9..693b633 100644
--- a/src/libsysprof/sp-process-model-item.h
+++ b/src/libsysprof/sp-process-model-item.h
@@ -1,6 +1,6 @@
 /* sp-process-model-item.h
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PROCESS_MODEL_ITEM_H
-#define SP_PROCESS_MODEL_ITEM_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include <gio/gio.h>
 
@@ -25,17 +28,23 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_PROCESS_MODEL_ITEM (sp_process_model_item_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpProcessModelItem, sp_process_model_item, SP, PROCESS_MODEL_ITEM, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpProcessModelItem  *sp_process_model_item_new              (GPid                pid);
+SYSPROF_AVAILABLE_IN_ALL
 guint                sp_process_model_item_hash             (SpProcessModelItem *self);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean             sp_process_model_item_equal            (SpProcessModelItem *self,
                                                              SpProcessModelItem *other);
+SYSPROF_AVAILABLE_IN_ALL
 GPid                 sp_process_model_item_get_pid          (SpProcessModelItem *self);
+SYSPROF_AVAILABLE_IN_ALL
 const gchar         *sp_process_model_item_get_command_line (SpProcessModelItem *self);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean             sp_process_model_item_is_kernel        (SpProcessModelItem *self);
+SYSPROF_AVAILABLE_IN_ALL
 const gchar * const *sp_process_model_item_get_argv         (SpProcessModelItem *self);
 
 G_END_DECLS
-
-#endif /* SP_PROCESS_MODEL_ITEM_H */
diff --git a/src/libsysprof/sp-process-model.c b/src/libsysprof/sp-process-model.c
index 198ab8d..44ce4e3 100644
--- a/src/libsysprof/sp-process-model.c
+++ b/src/libsysprof/sp-process-model.c
@@ -1,6 +1,6 @@
 /* sp-process-model.c
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 
 #include "sp-process-model.h"
diff --git a/src/libsysprof/sp-process-model.h b/src/libsysprof/sp-process-model.h
index a4a878e..ccb9a6f 100644
--- a/src/libsysprof/sp-process-model.h
+++ b/src/libsysprof/sp-process-model.h
@@ -1,6 +1,6 @@
 /* sp-process-model.h
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,23 +14,28 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PROCESS_MODEL_H
-#define SP_PROCESS_MODEL_H
+#pragma once
 
 #include <gio/gio.h>
 
+#include "sysprof-version-macros.h"
+
 G_BEGIN_DECLS
 
 #define SP_TYPE_PROCESS_MODEL (sp_process_model_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpProcessModel, sp_process_model, SP, PROCESS_MODEL, GObject)
 
+SYSPROF_AVAILABLE_IN_ALL
 SpProcessModel *sp_process_model_new          (void);
+SYSPROF_AVAILABLE_IN_ALL
 void            sp_process_model_reload       (SpProcessModel *self);
+SYSPROF_AVAILABLE_IN_ALL
 void            sp_process_model_queue_reload (SpProcessModel *self);
 
 G_END_DECLS
-
-#endif /* SP_PROCESS_MODEL_H */
diff --git a/src/libsysprof/sp-profile.c b/src/libsysprof/sp-profile.c
index 01f75eb..6908601 100644
--- a/src/libsysprof/sp-profile.c
+++ b/src/libsysprof/sp-profile.c
@@ -1,6 +1,6 @@
 /* sp-profile.c
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-profile.h"
 
 G_DEFINE_INTERFACE (SpProfile, sp_profile, G_TYPE_OBJECT)
diff --git a/src/libsysprof/sp-profile.h b/src/libsysprof/sp-profile.h
index c7fcbc9..0fa1013 100644
--- a/src/libsysprof/sp-profile.h
+++ b/src/libsysprof/sp-profile.h
@@ -1,6 +1,6 @@
 /* sp-profile.h
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,19 +14,23 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PROFILE_H
-#define SP_PROFILE_H
+#pragma once
 
 #include <gio/gio.h>
 
+#include "sysprof-version-macros.h"
+
 #include "sp-capture-reader.h"
 
 G_BEGIN_DECLS
 
 #define SP_TYPE_PROFILE (sp_profile_get_type ())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_INTERFACE (SpProfile, sp_profile, SP, PROFILE, GObject)
 
 struct _SpProfileInterface
@@ -44,16 +48,17 @@ struct _SpProfileInterface
                                GError              **error);
 };
 
+SYSPROF_AVAILABLE_IN_ALL
 void     sp_profile_set_reader      (SpProfile            *self,
                                      SpCaptureReader      *reader);
+SYSPROF_AVAILABLE_IN_ALL
 void     sp_profile_generate        (SpProfile            *self,
                                      GCancellable         *cancellable,
                                      GAsyncReadyCallback   callback,
                                      gpointer              user_data);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean sp_profile_generate_finish (SpProfile            *self,
                                      GAsyncResult         *result,
                                      GError              **error);
 
 G_END_DECLS
-
-#endif /* SP_PROFILE_H */
diff --git a/src/libsysprof/sp-profiler.c b/src/libsysprof/sp-profiler.c
index 290efc4..0287479 100644
--- a/src/libsysprof/sp-profiler.c
+++ b/src/libsysprof/sp-profiler.c
@@ -1,6 +1,6 @@
 /* sp-profiler.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,14 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#define G_LOG_DOMAIN "sp-profiler"
+
+#include "config.h"
+
 #include "sp-profiler.h"
 
 G_DEFINE_INTERFACE (SpProfiler, sp_profiler, G_TYPE_OBJECT)
diff --git a/src/libsysprof/sp-profiler.h b/src/libsysprof/sp-profiler.h
index 638a61a..8800b41 100644
--- a/src/libsysprof/sp-profiler.h
+++ b/src/libsysprof/sp-profiler.h
@@ -1,6 +1,6 @@
 /* sp-profiler.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,13 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_PROFILER_H
-#define SP_PROFILER_H
+#pragma once
+
+#include "sysprof-version-macros.h"
 
 #include "sp-capture-writer.h"
 #include "sp-source.h"
@@ -26,6 +29,7 @@ G_BEGIN_DECLS
 
 #define SP_TYPE_PROFILER (sp_profiler_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_INTERFACE (SpProfiler, sp_profiler, SP, PROFILER, GObject)
 
 struct _SpProfilerInterface
@@ -123,39 +127,58 @@ struct _SpProfilerInterface
                            guint      *n_pids);
 };
 
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_emit_failed               (SpProfiler          *self,
                                                         const GError        *error);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_emit_stopped              (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 gdouble          sp_profiler_get_elapsed               (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean         sp_profiler_get_is_mutable            (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean         sp_profiler_get_spawn_inherit_environ (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_set_spawn_inherit_environ (SpProfiler          *self,
                                                         gboolean             spawn_inherit_environ);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean         sp_profiler_get_whole_system          (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_set_whole_system          (SpProfiler          *self,
                                                         gboolean             whole_system);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean         sp_profiler_get_spawn                 (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_set_spawn                 (SpProfiler          *self,
                                                         gboolean             spawn);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_set_spawn_argv            (SpProfiler          *self,
                                                         const gchar * const *spawn_argv);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_set_spawn_env             (SpProfiler          *self,
                                                         const gchar * const *spawn_env);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_add_source                (SpProfiler          *self,
                                                         SpSource            *source);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_set_writer                (SpProfiler          *self,
                                                         SpCaptureWriter     *writer);
+SYSPROF_AVAILABLE_IN_ALL
 SpCaptureWriter *sp_profiler_get_writer                (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean         sp_profiler_get_is_running            (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_start                     (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_stop                      (SpProfiler          *self);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_add_pid                   (SpProfiler          *self,
                                                         GPid                 pid);
+SYSPROF_AVAILABLE_IN_ALL
 void             sp_profiler_remove_pid                (SpProfiler          *self,
                                                         GPid                 pid);
+SYSPROF_AVAILABLE_IN_ALL
 const GPid      *sp_profiler_get_pids                  (SpProfiler          *self,
                                                         guint               *n_pids);
 
 G_END_DECLS
-
-#endif /* SP_PROFILER_H */
diff --git a/src/libsysprof/sp-selection.c b/src/libsysprof/sp-selection.c
index af54581..5f7dbad 100644
--- a/src/libsysprof/sp-selection.c
+++ b/src/libsysprof/sp-selection.c
@@ -1,6 +1,6 @@
 /* sp-selection.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,14 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 #define G_LOG_DOMAIN "sp-selection"
 
+#include "config.h"
+
 #include "sp-selection.h"
 
 struct _SpSelection
diff --git a/src/libsysprof/sp-selection.h b/src/libsysprof/sp-selection.h
index 4faedbb..a4f5076 100644
--- a/src/libsysprof/sp-selection.h
+++ b/src/libsysprof/sp-selection.h
@@ -1,6 +1,6 @@
 /* sp-selection.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,17 +14,21 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_SELECTION_H
-#define SP_SELECTION_H
+#pragma once
 
 #include <glib-object.h>
 
+#include "sysprof-version-macros.h"
+
 G_BEGIN_DECLS
 
 #define SP_TYPE_SELECTION (sp_selection_get_type())
 
+SYSPROF_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (SpSelection, sp_selection, SP, SELECTION, GObject)
 
 typedef void (*SpSelectionForeachFunc) (SpSelection *self,
@@ -32,21 +36,26 @@ typedef void (*SpSelectionForeachFunc) (SpSelection *self,
                                         gint64       end_time,
                                         gpointer     user_data);
 
+SYSPROF_AVAILABLE_IN_ALL
 gboolean     sp_selection_get_has_selection (SpSelection            *self);
+SYSPROF_AVAILABLE_IN_ALL
 gboolean     sp_selection_contains          (SpSelection            *self,
                                              gint64                  time_at);
+SYSPROF_AVAILABLE_IN_ALL
 void         sp_selection_select_range      (SpSelection            *self,
                                              gint64                  begin_time,
                                              gint64                  end_time);
+SYSPROF_AVAILABLE_IN_ALL
 void         sp_selection_unselect_range    (SpSelection            *self,
                                              gint64                  begin,
                                              gint64                  end);
+SYSPROF_AVAILABLE_IN_ALL
 void         sp_selection_unselect_all      (SpSelection            *self);
+SYSPROF_AVAILABLE_IN_ALL
 void         sp_selection_foreach           (SpSelection            *self,
                                              SpSelectionForeachFunc  foreach_func,
                                              gpointer                user_data);
+SYSPROF_AVAILABLE_IN_ALL
 SpSelection *sp_selection_copy              (const SpSelection      *self);
 
 G_END_DECLS
-
-#endif /* SP_SELECTION_H */
diff --git a/src/libsysprof/sp-source-util.c b/src/libsysprof/sp-source-util.c
index 8aa792c..35b9252 100644
--- a/src/libsysprof/sp-source-util.c
+++ b/src/libsysprof/sp-source-util.c
@@ -18,6 +18,8 @@
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include <gio/gio.h>
 #include <string.h>
 
diff --git a/src/libsysprof/sp-source.c b/src/libsysprof/sp-source.c
index c03d658..9feb606 100644
--- a/src/libsysprof/sp-source.c
+++ b/src/libsysprof/sp-source.c
@@ -1,6 +1,6 @@
 /* sp-source.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-source.h"
 
 G_DEFINE_INTERFACE (SpSource, sp_source, G_TYPE_OBJECT)
diff --git a/src/libsysprof/sp-source.h b/src/libsysprof/sp-source.h
index 6149808..839dfb9 100644
--- a/src/libsysprof/sp-source.h
+++ b/src/libsysprof/sp-source.h
@@ -1,6 +1,6 @@
 /* sp-source.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_SOURCE_H
-#define SP_SOURCE_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -129,5 +130,3 @@ void     sp_source_start         (SpSource        *self);
 void     sp_source_stop          (SpSource        *self);
 
 G_END_DECLS
-
-#endif /* SP_SOURCE_H */
diff --git a/src/libsysprof/sp-symbol-dirs.c b/src/libsysprof/sp-symbol-dirs.c
index 9055022..9a9b49e 100644
--- a/src/libsysprof/sp-symbol-dirs.c
+++ b/src/libsysprof/sp-symbol-dirs.c
@@ -1,6 +1,6 @@
 /* sp-symbol-dirs.c
  *
- * Copyright 2017 Christian Hergert <chergert redhat com>
+ * Copyright 2017-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,6 +14,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/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
 #include "config.h"
diff --git a/src/libsysprof/sp-symbol-dirs.h b/src/libsysprof/sp-symbol-dirs.h
index 1665e3a..b7dc479 100644
--- a/src/libsysprof/sp-symbol-dirs.h
+++ b/src/libsysprof/sp-symbol-dirs.h
@@ -1,6 +1,6 @@
 /* sp-symbol-dirs.h
  *
- * Copyright 2017 Christian Hergert <chergert redhat com>
+ * Copyright 2017-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_SYMBOL_DIRS_H
-#define SP_SYMBOL_DIRS_H
+#pragma once
 
 #include <glib.h>
 
@@ -29,5 +30,3 @@ gchar **sp_symbol_dirs_get_paths (const gchar *dir,
                                   const gchar *name);
 
 G_END_DECLS
-
-#endif /* SP_SYMBOL_DIRS_H */
diff --git a/src/libsysprof/sp-symbol-resolver.c b/src/libsysprof/sp-symbol-resolver.c
index bdc647f..367e5ab 100644
--- a/src/libsysprof/sp-symbol-resolver.c
+++ b/src/libsysprof/sp-symbol-resolver.c
@@ -1,6 +1,6 @@
 /* sp-symbol-resolver.c
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
+#include "config.h"
+
 #include "sp-symbol-resolver.h"
 
 G_DEFINE_INTERFACE (SpSymbolResolver, sp_symbol_resolver, G_TYPE_OBJECT)
diff --git a/src/libsysprof/sp-symbol-resolver.h b/src/libsysprof/sp-symbol-resolver.h
index 149d954..a2b4761 100644
--- a/src/libsysprof/sp-symbol-resolver.h
+++ b/src/libsysprof/sp-symbol-resolver.h
@@ -1,6 +1,6 @@
 /* sp-symbol-resolver.h
  *
- * Copyright 2016 Christian Hergert <chergert redhat com>
+ * Copyright 2016-2019 Christian Hergert <chergert redhat com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-#ifndef SP_SYMBOL_RESOLVER_H
-#define SP_SYMBOL_RESOLVER_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -64,5 +65,3 @@ gchar *sp_symbol_resolver_resolve_with_context (SpSymbolResolver *self,
                                                 GQuark           *tag);
 
 G_END_DECLS
-
-#endif /* SP_SYMBOL_RESOLVER_H */
diff --git a/src/libsysprof/sysprof.h b/src/libsysprof/sysprof.h
index 1b762df..844c268 100644
--- a/src/libsysprof/sysprof.h
+++ b/src/libsysprof/sysprof.h
@@ -1,6 +1,6 @@
 /* sysprof.h
  *
- * Copyright 2016 Christian Hergert <christian hergert me>
+ * Copyright 2016-2019 Christian Hergert <christian hergert me>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/libsysprof/stackstash.c b/src/stackstash.c
similarity index 100%
rename from src/libsysprof/stackstash.c
rename to src/stackstash.c
diff --git a/src/libsysprof/stackstash.h b/src/stackstash.h
similarity index 100%
rename from src/libsysprof/stackstash.h
rename to src/stackstash.h


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]