mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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.
This commit is contained in:
@ -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 = [
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
/* sp-callgraph-profile-private.h
|
||||
*
|
||||
* Copyright 2016 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* 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 SP_CALLGRAPH_PROFILE_PRIVATE_H
|
||||
#define SP_CALLGRAPH_PROFILE_PRIVATE_H
|
||||
|
||||
#include "sp-callgraph-profile.h"
|
||||
#include "stackstash.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
StackStash *sp_callgraph_profile_get_stash (SpCallgraphProfile *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* SP_CALLGRAPH_PROFILE_PRIVATE_H */
|
||||
@ -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);
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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 */
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
|
||||
#define G_LOG_DOMAIN "sp-kallsyms"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "sp-line-reader.h"
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user