mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
tree: start on massive tree refactor
The big thing going on here is that we are going to split up the libraries a bit better, and remove GObject from the capture library. The libsysprof library will bring in the capture library statically, so we can export the symbols we want. Eventually, we will bump the version to sysprof-3, but not yet.
This commit is contained in:
@ -1,28 +0,0 @@
|
|||||||
if get_option('with_sysprofd') == 'bundled'
|
|
||||||
|
|
||||||
sysprofd_sources = [
|
|
||||||
'sysprofd.c',
|
|
||||||
'sd-bus-helper.c',
|
|
||||||
'sd-bus-helper.h',
|
|
||||||
'../lib/sp-kallsyms.c',
|
|
||||||
'../lib/sp-kallsyms.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
# NOTE: This is used in data/meson.build
|
|
||||||
pkglibexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'sysprof')
|
|
||||||
|
|
||||||
sysprofd_deps = [
|
|
||||||
dependency('libsystemd', version: '>=222'),
|
|
||||||
dependency('glib-2.0'),
|
|
||||||
]
|
|
||||||
|
|
||||||
sysprofd = executable('sysprofd',
|
|
||||||
sysprofd_sources,
|
|
||||||
c_args: exe_c_args,
|
|
||||||
link_args: exe_link_args,
|
|
||||||
dependencies: sysprofd_deps,
|
|
||||||
install: true,
|
|
||||||
install_dir: pkglibexecdir,
|
|
||||||
)
|
|
||||||
|
|
||||||
endif
|
|
||||||
@ -1,6 +1,3 @@
|
|||||||
datadir = get_option('datadir')
|
|
||||||
podir = join_paths(meson.source_root(), 'po')
|
|
||||||
|
|
||||||
install_data('sysprof-mime.xml',
|
install_data('sysprof-mime.xml',
|
||||||
install_dir: join_paths(datadir, 'mime/packages')
|
install_dir: join_paths(datadir, 'mime/packages')
|
||||||
)
|
)
|
||||||
@ -10,53 +7,23 @@ install_data('org.gnome.sysprof2.gschema.xml',
|
|||||||
)
|
)
|
||||||
|
|
||||||
i18n.merge_file(
|
i18n.merge_file(
|
||||||
input: 'org.gnome.Sysprof2.appdata.xml.in',
|
input: 'org.gnome.Sysprof2.appdata.xml.in',
|
||||||
output: 'org.gnome.Sysprof2.appdata.xml',
|
output: 'org.gnome.Sysprof2.appdata.xml',
|
||||||
po_dir: podir,
|
po_dir: podir,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(datadir, 'metainfo')
|
install_dir: join_paths(datadir, 'metainfo')
|
||||||
)
|
)
|
||||||
|
|
||||||
i18n.merge_file(
|
i18n.merge_file(
|
||||||
input: 'org.gnome.Sysprof2.desktop.in',
|
input: 'org.gnome.Sysprof2.desktop.in',
|
||||||
output: 'org.gnome.Sysprof2.desktop',
|
output: 'org.gnome.Sysprof2.desktop',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
po_dir: podir,
|
po_dir: podir,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(datadir, 'applications')
|
install_dir: join_paths(datadir, 'applications')
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgconf = configuration_data()
|
|
||||||
pkgconf.set('VERSION', meson.project_version())
|
|
||||||
pkgconf.set('API_VERSION', libsysprof_api_version)
|
|
||||||
pkgconf.set('prefix', get_option('prefix'))
|
|
||||||
pkgconf.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
|
|
||||||
pkgconf.set('includedir', join_paths('${prefix}', get_option('includedir')))
|
|
||||||
|
|
||||||
pkgconfigdir = join_paths(get_option('libdir'), 'pkgconfig')
|
|
||||||
configure_file(
|
|
||||||
input: 'sysprof.pc.in',
|
|
||||||
output: 'sysprof-@0@.pc'.format(libsysprof_api_version),
|
|
||||||
configuration: pkgconf,
|
|
||||||
install: true,
|
|
||||||
install_dir: pkgconfigdir,
|
|
||||||
)
|
|
||||||
configure_file(
|
|
||||||
input: 'sysprof-capture.pc.in',
|
|
||||||
output: 'sysprof-capture-@0@.pc'.format(libsysprof_api_version),
|
|
||||||
configuration: pkgconf,
|
|
||||||
install: true,
|
|
||||||
install_dir: pkgconfigdir,
|
|
||||||
)
|
|
||||||
if get_option('enable_gtk')
|
if get_option('enable_gtk')
|
||||||
configure_file(
|
|
||||||
input: 'sysprof-ui.pc.in',
|
|
||||||
output: 'sysprof-ui-@0@.pc'.format(libsysprof_api_version),
|
|
||||||
configuration: pkgconf,
|
|
||||||
install: true,
|
|
||||||
install_dir: pkgconfigdir,
|
|
||||||
)
|
|
||||||
|
|
||||||
icon_sizes = ['scalable', 'symbolic']
|
icon_sizes = ['scalable', 'symbolic']
|
||||||
foreach size: icon_sizes
|
foreach size: icon_sizes
|
||||||
install_subdir('icons/' + size,
|
install_subdir('icons/' + size,
|
||||||
@ -64,45 +31,3 @@ if get_option('enable_gtk')
|
|||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('with_sysprofd') == 'bundled'
|
|
||||||
|
|
||||||
sysprofdconf = configuration_data()
|
|
||||||
sysprofdconf.set('sysprofdprivdir', pkglibexecdir)
|
|
||||||
|
|
||||||
configure_file(
|
|
||||||
input: 'org.gnome.Sysprof2.service.in',
|
|
||||||
output: 'org.gnome.Sysprof2.service',
|
|
||||||
configuration: sysprofdconf,
|
|
||||||
install: true,
|
|
||||||
install_dir: join_paths(datadir, 'dbus-1/system-services'),
|
|
||||||
)
|
|
||||||
configure_file(
|
|
||||||
input: 'org.gnome.Sysprof2.conf.in',
|
|
||||||
output: 'org.gnome.Sysprof2.conf',
|
|
||||||
configuration: sysprofdconf,
|
|
||||||
install: true,
|
|
||||||
install_dir: join_paths(datadir, 'dbus-1/system.d'),
|
|
||||||
)
|
|
||||||
|
|
||||||
systemdunitdir = get_option('systemdunitdir')
|
|
||||||
if systemdunitdir == ''
|
|
||||||
systemdunitdir = dependency('systemd').get_pkgconfig_variable('systemdsystemunitdir')
|
|
||||||
endif
|
|
||||||
configure_file(
|
|
||||||
input: 'sysprof2.service.in',
|
|
||||||
output: 'sysprof2.service',
|
|
||||||
configuration: sysprofdconf,
|
|
||||||
install: true,
|
|
||||||
install_dir: systemdunitdir,
|
|
||||||
)
|
|
||||||
|
|
||||||
i18n.merge_file(
|
|
||||||
input: 'org.gnome.sysprof2.policy.in',
|
|
||||||
output: 'org.gnome.sysprof2.policy',
|
|
||||||
po_dir: podir,
|
|
||||||
install: true,
|
|
||||||
install_dir: join_paths(datadir, 'polkit-1/actions'),
|
|
||||||
)
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
prefix=@prefix@
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libsysprof-capture-@API_VERSION@
|
|
||||||
Description: The sysprof profiler library for reading and writing capture files
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lsysprof-capture-@API_VERSION@
|
|
||||||
Cflags: -I${includedir}/sysprof-@API_VERSION@
|
|
||||||
Requires: gobject-2.0
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
prefix=@prefix@
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libsysprof-ui-@API_VERSION@
|
|
||||||
Description: The sysprof library containing reusable GTK widgets
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lsysprof-ui-@API_VERSION@
|
|
||||||
Cflags: -I${includedir}/sysprof-@API_VERSION@
|
|
||||||
Requires: gio-2.0 gtk+-3.0 sysprof-@API_VERSION@
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
prefix=@prefix@
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libsysprof-@API_VERSION@
|
|
||||||
Description: The sysprof profiler library
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lsysprof-@API_VERSION@
|
|
||||||
Cflags: -I${includedir}/sysprof-@API_VERSION@
|
|
||||||
Requires: gio-2.0
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
callgraph_headers = [
|
|
||||||
'sp-callgraph-profile.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
callgraph_sources = [
|
|
||||||
'sp-callgraph-profile-private.h',
|
|
||||||
'sp-callgraph-profile.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers += files(callgraph_headers)
|
|
||||||
libsysprof_sources += files(callgraph_sources)
|
|
||||||
|
|
||||||
install_headers(callgraph_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'callgraph'))
|
|
||||||
|
|
||||||
|
|
||||||
if get_option('enable_gtk')
|
|
||||||
|
|
||||||
callgraph_ui_headers = [
|
|
||||||
'sp-callgraph-view.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
callgraph_ui_sources = [
|
|
||||||
'sp-callgraph-view.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_ui_headers += files(callgraph_ui_headers)
|
|
||||||
libsysprof_ui_sources += files(callgraph_ui_sources)
|
|
||||||
|
|
||||||
install_headers(callgraph_ui_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'callgraph'))
|
|
||||||
|
|
||||||
endif
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
capture_headers = [
|
|
||||||
'sp-capture-condition.h',
|
|
||||||
'sp-capture-cursor.h',
|
|
||||||
'sp-capture-reader.h',
|
|
||||||
'sp-capture-types.h',
|
|
||||||
'sp-capture-writer.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
capture_sources = [
|
|
||||||
'sp-capture-condition.c',
|
|
||||||
'sp-capture-cursor.c',
|
|
||||||
'sp-capture-reader.c',
|
|
||||||
'sp-capture-writer.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
static_capture_sources = [
|
|
||||||
'sp-capture-reader.c',
|
|
||||||
'sp-capture-writer.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers += files(capture_headers)
|
|
||||||
libsysprof_sources += files(capture_sources)
|
|
||||||
|
|
||||||
libsysprof_capture_sources += files(static_capture_sources)
|
|
||||||
|
|
||||||
install_headers(capture_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'capture'))
|
|
||||||
143
lib/meson.build
143
lib/meson.build
@ -1,143 +0,0 @@
|
|||||||
|
|
||||||
# We split up the library code into two libraries. One containing the
|
|
||||||
# minimum necessary to do profiling on a particular host (that might not
|
|
||||||
# have GTK+ installed), and the library containing reusable GTK
|
|
||||||
# components (for IDE integration).
|
|
||||||
|
|
||||||
libsysprof_api_version = '2'
|
|
||||||
libsysprof_header_subdir = 'sysprof-' + libsysprof_api_version
|
|
||||||
|
|
||||||
libsysprof_version_conf = configuration_data()
|
|
||||||
libsysprof_version = meson.project_version().split('.')
|
|
||||||
libsysprof_version_conf.set('MAJOR_VERSION', libsysprof_version[0])
|
|
||||||
libsysprof_version_conf.set('MINOR_VERSION', libsysprof_version[1])
|
|
||||||
libsysprof_version_conf.set('MICRO_VERSION', libsysprof_version[2])
|
|
||||||
libsysprof_version_conf.set('VERSION', meson.project_version())
|
|
||||||
|
|
||||||
configure_file(
|
|
||||||
input: 'sysprof-version.h.in',
|
|
||||||
output: 'sysprof-version.h',
|
|
||||||
configuration: libsysprof_version_conf,
|
|
||||||
install: true,
|
|
||||||
install_dir: join_paths(get_option('includedir'), 'sysprof-' + libsysprof_api_version)
|
|
||||||
)
|
|
||||||
|
|
||||||
libsysprof_base_headers = [
|
|
||||||
'sysprof.h',
|
|
||||||
'sysprof-capture.h',
|
|
||||||
'sp-address.h',
|
|
||||||
'sp-clock.h',
|
|
||||||
'sp-error.h',
|
|
||||||
'sp-kallsyms.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_base_sources = [
|
|
||||||
'sp-address.c',
|
|
||||||
'sp-clock.c',
|
|
||||||
'sp-error.c',
|
|
||||||
'sp-kallsyms.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers = libsysprof_base_headers
|
|
||||||
libsysprof_sources = libsysprof_base_sources
|
|
||||||
|
|
||||||
libsysprof_ui_base_headers = ['sysprof-ui.h']
|
|
||||||
libsysprof_ui_headers = libsysprof_ui_base_headers
|
|
||||||
libsysprof_ui_sources = []
|
|
||||||
|
|
||||||
libsysprof_capture_sources = libsysprof_base_sources
|
|
||||||
|
|
||||||
subdir('callgraph')
|
|
||||||
subdir('capture')
|
|
||||||
subdir('profiler')
|
|
||||||
subdir('sources')
|
|
||||||
subdir('symbols')
|
|
||||||
subdir('util')
|
|
||||||
subdir('visualizers')
|
|
||||||
subdir('widgets')
|
|
||||||
|
|
||||||
cxx = meson.get_compiler('cpp')
|
|
||||||
|
|
||||||
libsysprof_capture_deps = [
|
|
||||||
dependency('glib-2.0'),
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_deps = [
|
|
||||||
cxx.find_library('stdc++'),
|
|
||||||
dependency('gio-unix-2.0'),
|
|
||||||
]
|
|
||||||
|
|
||||||
version_link_arg = '-Wl,--version-script,' + join_paths(meson.current_source_dir(), 'sysprof.map')
|
|
||||||
libsysprof_c_args = release_flags + ['-DSP_ENABLE_GOBJECT']
|
|
||||||
|
|
||||||
if get_option('with_sysprofd') != 'none'
|
|
||||||
libsysprof_deps += dependency('polkit-gobject-1')
|
|
||||||
libsysprof_c_args += '-DENABLE_POLKIT'
|
|
||||||
endif
|
|
||||||
|
|
||||||
libsysprof_capture = static_library('sysprof-capture-' + libsysprof_api_version,
|
|
||||||
libsysprof_capture_sources,
|
|
||||||
c_args: release_flags,
|
|
||||||
dependencies: libsysprof_capture_deps,
|
|
||||||
install: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
libsysprof = shared_library('sysprof-' + libsysprof_api_version,
|
|
||||||
libsysprof_sources,
|
|
||||||
dependencies: libsysprof_deps,
|
|
||||||
c_args: libsysprof_c_args,
|
|
||||||
link_args: version_link_arg,
|
|
||||||
link_depends: 'sysprof.map',
|
|
||||||
install: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
libsysprof_dep = declare_dependency(
|
|
||||||
include_directories: include_directories('.'),
|
|
||||||
link_with: libsysprof,
|
|
||||||
dependencies: libsysprof_deps,
|
|
||||||
)
|
|
||||||
|
|
||||||
libsysprof_capture_dep = declare_dependency(
|
|
||||||
include_directories: include_directories('.'),
|
|
||||||
link_with: libsysprof_capture,
|
|
||||||
dependencies: libsysprof_capture_deps,
|
|
||||||
)
|
|
||||||
|
|
||||||
install_headers(libsysprof_base_headers, subdir: libsysprof_header_subdir)
|
|
||||||
|
|
||||||
if get_option('enable_gtk')
|
|
||||||
# This is our GTK library containing the widgets suitable for viewing
|
|
||||||
# and manipulating the various profiler API in libsysprof. This is
|
|
||||||
# meant to be used by IDEs and the sysprof gui.
|
|
||||||
|
|
||||||
libsysprof_ui_resources = gnome.compile_resources(
|
|
||||||
'sp-ui-resources', 'resources/libsysprof.gresource.xml',
|
|
||||||
source_dir: 'resources',
|
|
||||||
c_name: 'sp',
|
|
||||||
)
|
|
||||||
|
|
||||||
libsysprof_ui_deps = [
|
|
||||||
libsysprof_dep,
|
|
||||||
dependency('gtk+-3.0', version: '>=3.22.0'),
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_ui_c_args = release_flags + ['-DSP_ENABLE_GOBJECT']
|
|
||||||
|
|
||||||
libsysprof_ui = shared_library('sysprof-ui-' + libsysprof_api_version,
|
|
||||||
libsysprof_ui_resources + libsysprof_ui_sources,
|
|
||||||
dependencies: libsysprof_ui_deps,
|
|
||||||
c_args: libsysprof_ui_c_args,
|
|
||||||
link_args: version_link_arg,
|
|
||||||
link_depends: 'sysprof.map',
|
|
||||||
install: true,
|
|
||||||
)
|
|
||||||
|
|
||||||
libsysprof_ui_dep = declare_dependency(
|
|
||||||
dependencies: libsysprof_ui_deps,
|
|
||||||
link_with: libsysprof_ui,
|
|
||||||
include_directories: include_directories('.'),
|
|
||||||
)
|
|
||||||
|
|
||||||
install_headers(libsysprof_ui_base_headers, subdir: libsysprof_header_subdir)
|
|
||||||
|
|
||||||
endif
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
profiler_headers = [
|
|
||||||
'sp-local-profiler.h',
|
|
||||||
'sp-profile.h',
|
|
||||||
'sp-profiler.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
profiler_sources = [
|
|
||||||
'sp-local-profiler.c',
|
|
||||||
'sp-profile.c',
|
|
||||||
'sp-profiler.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers += files(profiler_headers)
|
|
||||||
libsysprof_sources += files(profiler_sources)
|
|
||||||
|
|
||||||
install_headers(profiler_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'profiler'))
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
sources_headers = [
|
|
||||||
'sp-gjs-source.h',
|
|
||||||
'sp-hostinfo-source.h',
|
|
||||||
'sp-memory-source.h',
|
|
||||||
'sp-perf-source.h',
|
|
||||||
'sp-proc-source.h',
|
|
||||||
'sp-source.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
sources_sources = [
|
|
||||||
'sp-gjs-source.c',
|
|
||||||
'sp-hostinfo-source.c',
|
|
||||||
'sp-memory-source.c',
|
|
||||||
'sp-perf-counter.c',
|
|
||||||
'sp-perf-counter.h',
|
|
||||||
'sp-perf-source.c',
|
|
||||||
'sp-proc-source.c',
|
|
||||||
'sp-source.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers += files(sources_headers)
|
|
||||||
libsysprof_sources += files(sources_sources)
|
|
||||||
|
|
||||||
install_headers(sources_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'sources'))
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
symbols_headers = [
|
|
||||||
'sp-elf-symbol-resolver.h',
|
|
||||||
'sp-jitmap-symbol-resolver.h',
|
|
||||||
'sp-kernel-symbol-resolver.h',
|
|
||||||
'sp-kernel-symbol.h',
|
|
||||||
'sp-symbol-dirs.h',
|
|
||||||
'sp-symbol-resolver.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
symbols_sources = [
|
|
||||||
'sp-elf-symbol-resolver.c',
|
|
||||||
'sp-jitmap-symbol-resolver.c',
|
|
||||||
'sp-kernel-symbol-resolver.c',
|
|
||||||
'sp-kernel-symbol.c',
|
|
||||||
'sp-symbol-dirs.c',
|
|
||||||
'sp-symbol-resolver.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers += files(symbols_headers)
|
|
||||||
libsysprof_sources += files(symbols_sources)
|
|
||||||
|
|
||||||
install_headers(symbols_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'symbols'))
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
/* sysprof.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 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 SYSPROF_H
|
|
||||||
#define SYSPROF_H
|
|
||||||
|
|
||||||
#include <gio/gio.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define SYSPROF_INSIDE
|
|
||||||
#define SP_ENABLE_GOBJECT
|
|
||||||
|
|
||||||
# include "sp-address.h"
|
|
||||||
# include "sp-clock.h"
|
|
||||||
# include "sp-error.h"
|
|
||||||
# include "sysprof-version.h"
|
|
||||||
|
|
||||||
# include "callgraph/sp-callgraph-profile.h"
|
|
||||||
|
|
||||||
# include "capture/sp-capture-condition.h"
|
|
||||||
# include "capture/sp-capture-cursor.h"
|
|
||||||
# include "capture/sp-capture-reader.h"
|
|
||||||
# include "capture/sp-capture-writer.h"
|
|
||||||
|
|
||||||
# include "profiler/sp-local-profiler.h"
|
|
||||||
# include "profiler/sp-profile.h"
|
|
||||||
# include "profiler/sp-profiler.h"
|
|
||||||
|
|
||||||
# include "sources/sp-gjs-source.h"
|
|
||||||
# include "sources/sp-hostinfo-source.h"
|
|
||||||
# include "sources/sp-memory-source.h"
|
|
||||||
# include "sources/sp-perf-source.h"
|
|
||||||
# include "sources/sp-proc-source.h"
|
|
||||||
# include "sources/sp-source.h"
|
|
||||||
|
|
||||||
# include "symbols/sp-elf-symbol-resolver.h"
|
|
||||||
# include "symbols/sp-jitmap-symbol-resolver.h"
|
|
||||||
# include "symbols/sp-kernel-symbol-resolver.h"
|
|
||||||
# include "symbols/sp-kernel-symbol.h"
|
|
||||||
# include "symbols/sp-symbol-dirs.h"
|
|
||||||
# include "symbols/sp-symbol-resolver.h"
|
|
||||||
|
|
||||||
# include "util/sp-map-lookaside.h"
|
|
||||||
# include "util/sp-selection.h"
|
|
||||||
|
|
||||||
#undef SP_ENABLE_GOBJECT
|
|
||||||
#undef SYSPROF_INSIDE
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* SYSPROF_H */
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
global:
|
|
||||||
sp_*;
|
|
||||||
local:
|
|
||||||
*;
|
|
||||||
};
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
util_headers = [
|
|
||||||
'sp-map-lookaside.h',
|
|
||||||
'sp-selection.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
util_sources = [
|
|
||||||
'binfile.c',
|
|
||||||
'binfile.h',
|
|
||||||
'demangle.cpp',
|
|
||||||
'demangle.h',
|
|
||||||
'elfparser.c',
|
|
||||||
'elfparser.h',
|
|
||||||
'sp-line-reader.c',
|
|
||||||
'sp-line-reader.h',
|
|
||||||
'sp-map-lookaside.c',
|
|
||||||
'sp-platform.c',
|
|
||||||
'sp-platform.h',
|
|
||||||
'sp-selection.c',
|
|
||||||
'stackstash.c',
|
|
||||||
'stackstash.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_headers += files(util_headers)
|
|
||||||
libsysprof_sources += files(util_sources)
|
|
||||||
|
|
||||||
install_headers(util_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'util'))
|
|
||||||
|
|
||||||
|
|
||||||
if get_option('enable_gtk')
|
|
||||||
|
|
||||||
util_ui_headers = [
|
|
||||||
'sp-model-filter.h',
|
|
||||||
'sp-process-model-item.h',
|
|
||||||
'sp-process-model.h',
|
|
||||||
'sp-zoom-manager.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
util_ui_sources = [
|
|
||||||
'pointcache.c',
|
|
||||||
'pointcache.h',
|
|
||||||
'rectangles.c',
|
|
||||||
'rectangles.h',
|
|
||||||
'sp-color-cycle.c',
|
|
||||||
'sp-color-cycle.h',
|
|
||||||
'sp-model-filter.c',
|
|
||||||
'sp-process-model-item.c',
|
|
||||||
'sp-process-model.c',
|
|
||||||
'sp-theme-manager.c',
|
|
||||||
'sp-theme-manager.h',
|
|
||||||
'sp-zoom-manager.c',
|
|
||||||
'stackstash.c',
|
|
||||||
'stackstash.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_ui_headers += files(util_ui_headers)
|
|
||||||
libsysprof_ui_sources += files(util_ui_sources)
|
|
||||||
|
|
||||||
install_headers(util_ui_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'util'))
|
|
||||||
|
|
||||||
endif
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
if get_option('enable_gtk')
|
|
||||||
|
|
||||||
visualizer_ui_headers = [
|
|
||||||
'sp-cpu-visualizer-row.h',
|
|
||||||
'sp-line-visualizer-row.h',
|
|
||||||
'sp-mark-visualizer-row.h',
|
|
||||||
'sp-visualizer-row.h',
|
|
||||||
'sp-visualizer-view.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
visualizer_ui_sources = [
|
|
||||||
'sp-cpu-visualizer-row.c',
|
|
||||||
'sp-line-visualizer-row.c',
|
|
||||||
'sp-mark-visualizer-row.c',
|
|
||||||
'sp-visualizer-list.c',
|
|
||||||
'sp-visualizer-list.h',
|
|
||||||
'sp-visualizer-row-private.h',
|
|
||||||
'sp-visualizer-row.c',
|
|
||||||
'sp-visualizer-ticks.c',
|
|
||||||
'sp-visualizer-ticks.h',
|
|
||||||
'sp-visualizer-view.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_ui_headers += files(visualizer_ui_headers)
|
|
||||||
libsysprof_ui_sources += files(visualizer_ui_sources)
|
|
||||||
|
|
||||||
install_headers(visualizer_ui_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'visualizers'))
|
|
||||||
|
|
||||||
endif
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
if get_option('enable_gtk')
|
|
||||||
|
|
||||||
widgets_ui_headers = [
|
|
||||||
'sp-cell-renderer-percent.h',
|
|
||||||
'sp-empty-state-view.h',
|
|
||||||
'sp-failed-state-view.h',
|
|
||||||
'sp-multi-paned.h',
|
|
||||||
'sp-process-model-row.h',
|
|
||||||
'sp-profiler-menu-button.h',
|
|
||||||
'sp-recording-state-view.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
widgets_ui_sources = [
|
|
||||||
'sp-cell-renderer-percent.c',
|
|
||||||
'sp-empty-state-view.c',
|
|
||||||
'sp-failed-state-view.c',
|
|
||||||
'sp-multi-paned.c',
|
|
||||||
'sp-process-model-row.c',
|
|
||||||
'sp-profiler-menu-button.c',
|
|
||||||
'sp-recording-state-view.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
libsysprof_ui_headers += files(widgets_ui_headers)
|
|
||||||
libsysprof_ui_sources += files(widgets_ui_sources)
|
|
||||||
|
|
||||||
install_headers(widgets_ui_headers,
|
|
||||||
subdir: join_paths(libsysprof_header_subdir, 'widgets'))
|
|
||||||
|
|
||||||
endif
|
|
||||||
48
meson.build
48
meson.build
@ -1,19 +1,30 @@
|
|||||||
project('sysprof', ['c', 'cpp'],
|
project('sysprof', ['c', 'cpp'],
|
||||||
license: ['GPL3+', 'GPL2+'],
|
license: ['GPL3+', 'GPL2+'],
|
||||||
version: '3.32.0',
|
version: '3.33.1',
|
||||||
meson_version: '>=0.47.2',
|
meson_version: '>=0.49.0',
|
||||||
default_options: [
|
default_options: [ 'c_std=gnu11',
|
||||||
'c_std=gnu11',
|
'cpp_std=c++03',
|
||||||
'cpp_std=c++03',
|
'warning_level=2',
|
||||||
'warning_level=2',
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
gnome = import('gnome')
|
||||||
|
pkgconfig = import('pkgconfig')
|
||||||
|
i18n = import('i18n')
|
||||||
|
|
||||||
|
libsysprof_api_version = 2
|
||||||
version_split = meson.project_version().split('.')
|
version_split = meson.project_version().split('.')
|
||||||
|
datadir = get_option('datadir')
|
||||||
|
podir = join_paths(meson.source_root(), 'po')
|
||||||
|
|
||||||
|
|
||||||
|
glib_req_version = '>= 2.60'
|
||||||
|
gtk_req_version = '>= 3.24'
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
config_h = configuration_data()
|
cxx = meson.get_compiler('cpp')
|
||||||
|
|
||||||
|
config_h = configuration_data()
|
||||||
config_h.set_quoted('PACKAGE_NAME', 'sysprof')
|
config_h.set_quoted('PACKAGE_NAME', 'sysprof')
|
||||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
config_h.set_quoted('PACKAGE_STRING', 'sysprof-' + meson.project_version())
|
config_h.set_quoted('PACKAGE_STRING', 'sysprof-' + meson.project_version())
|
||||||
@ -21,7 +32,10 @@ config_h.set_quoted('PACKAGE_BUGREPORT', 'https://bugzilla.gnome.org/enter_bug.c
|
|||||||
config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING')
|
config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING')
|
||||||
config_h.set('PACKAGE', 'PACKAGE_NAME')
|
config_h.set('PACKAGE', 'PACKAGE_NAME')
|
||||||
config_h.set('VERSION', 'PACKAGE_VERSION')
|
config_h.set('VERSION', 'PACKAGE_VERSION')
|
||||||
# PACKAGE_URL
|
|
||||||
|
if get_option('with_sysprofd') != 'none'
|
||||||
|
config_h.set10('ENABLE_POLKIT', true)
|
||||||
|
endif
|
||||||
|
|
||||||
debugdir = get_option('debugdir')
|
debugdir = get_option('debugdir')
|
||||||
if debugdir == ''
|
if debugdir == ''
|
||||||
@ -44,7 +58,6 @@ if has_use_clockid and has_clockid
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
add_global_arguments([
|
add_global_arguments([
|
||||||
'-DHAVE_CONFIG_H',
|
|
||||||
'-I' + meson.build_root(), # config.h
|
'-I' + meson.build_root(), # config.h
|
||||||
], language: 'c')
|
], language: 'c')
|
||||||
|
|
||||||
@ -145,27 +158,12 @@ int main(void) {
|
|||||||
error('Sysprof requires a C compiler with stdatomic support such as GCC 4.9 or newer')
|
error('Sysprof requires a C compiler with stdatomic support such as GCC 4.9 or newer')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
exe_c_args = []
|
|
||||||
exe_link_args = []
|
|
||||||
if cc.has_argument('-fPIE')
|
|
||||||
exe_c_args += '-fPIE'
|
|
||||||
exe_link_args += '-fpie'
|
|
||||||
endif
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
output: 'config.h',
|
output: 'config.h',
|
||||||
configuration: config_h
|
configuration: config_h
|
||||||
)
|
)
|
||||||
|
|
||||||
gnome = import('gnome')
|
|
||||||
i18n = import('i18n')
|
|
||||||
|
|
||||||
subdir('lib')
|
|
||||||
subdir('daemon')
|
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('tools')
|
|
||||||
subdir('tests')
|
|
||||||
|
|
||||||
subdir('data')
|
subdir('data')
|
||||||
subdir('help')
|
subdir('help')
|
||||||
subdir('po')
|
subdir('po')
|
||||||
|
|||||||
53
src/libsysprof-capture/meson.build
Normal file
53
src/libsysprof-capture/meson.build
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
libsysprof_capture_headers = [
|
||||||
|
'sp-capture-condition.h',
|
||||||
|
'sp-capture-cursor.h',
|
||||||
|
'sp-capture-reader.h',
|
||||||
|
'sp-capture-types.h',
|
||||||
|
'sp-capture-writer.h',
|
||||||
|
'sysprof-capture.h',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_capture_sources = [
|
||||||
|
'sp-capture-condition.c',
|
||||||
|
'sp-capture-cursor.c',
|
||||||
|
'sp-capture-reader.c',
|
||||||
|
'sp-capture-writer.c',
|
||||||
|
]
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input: 'sysprof-version.h.in',
|
||||||
|
output: 'sysprof-version.h',
|
||||||
|
configuration: sysprof_version_conf,
|
||||||
|
install_dir: join_paths(get_option('includedir'), sysprof_header_subdir),
|
||||||
|
)
|
||||||
|
|
||||||
|
libsysprof_capture_deps = [
|
||||||
|
dependency('glib-2.0', version: glib_req_version),
|
||||||
|
libshared_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
install_headers(libsysprof_capture_headers, subdir: sysprof_header_subdir)
|
||||||
|
|
||||||
|
libsysprof_capture = static_library('sysprof-capture-@0@'.format(libsysprof_api_version),
|
||||||
|
libsysprof_capture_sources,
|
||||||
|
dependencies: libsysprof_capture_deps,
|
||||||
|
c_args: [ '-DSYSPROF_CAPTURE_COMPILATION' ],
|
||||||
|
install_dir: get_option('libdir'),
|
||||||
|
install: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
libsysprof_capture_dep = declare_dependency(
|
||||||
|
link_whole: libsysprof_capture,
|
||||||
|
dependencies: libsysprof_capture_deps,
|
||||||
|
include_directories: include_directories('.'),
|
||||||
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(
|
||||||
|
subdirs: [ sysprof_header_subdir ],
|
||||||
|
version: meson.project_version(),
|
||||||
|
name: 'sysprof-capture-@0@'.format(libsysprof_api_version),
|
||||||
|
filebase: 'sysprof-capture-@0@'.format(libsysprof_api_version),
|
||||||
|
description: 'The static capture library for tools that generate profiling capture data',
|
||||||
|
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||||
|
requires: [ 'glib-2.0' ],
|
||||||
|
)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-condition.c
|
/* sp-capture-condition.c
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,14 +14,18 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define G_LOG_DOMAIN "sp-capture-condition"
|
#define G_LOG_DOMAIN "sp-capture-condition"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "capture/sp-capture-condition.h"
|
#include "sp-capture-condition.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:sp-capture-condition
|
* SECTION:sp-capture-condition
|
||||||
@ -45,6 +49,7 @@ typedef enum
|
|||||||
|
|
||||||
struct _SpCaptureCondition
|
struct _SpCaptureCondition
|
||||||
{
|
{
|
||||||
|
volatile gint ref_count;
|
||||||
SpCaptureConditionType type;
|
SpCaptureConditionType type;
|
||||||
union {
|
union {
|
||||||
GArray *where_type_in;
|
GArray *where_type_in;
|
||||||
@ -144,11 +149,22 @@ sp_capture_condition_match (const SpCaptureCondition *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static SpCaptureCondition *
|
static SpCaptureCondition *
|
||||||
|
sp_capture_condition_init (void)
|
||||||
|
{
|
||||||
|
SpCaptureCondition *self;
|
||||||
|
|
||||||
|
self = g_slice_new0 (SpCaptureCondition);
|
||||||
|
self->ref_count = 1;
|
||||||
|
|
||||||
|
return g_steal_pointer (&self);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpCaptureCondition *
|
||||||
sp_capture_condition_copy (const SpCaptureCondition *self)
|
sp_capture_condition_copy (const SpCaptureCondition *self)
|
||||||
{
|
{
|
||||||
SpCaptureCondition *copy;
|
SpCaptureCondition *copy;
|
||||||
|
|
||||||
copy = g_slice_new0 (SpCaptureCondition);
|
copy = sp_capture_condition_init ();
|
||||||
copy->type = self->type;
|
copy->type = self->type;
|
||||||
|
|
||||||
switch (self->type)
|
switch (self->type)
|
||||||
@ -185,13 +201,13 @@ sp_capture_condition_copy (const SpCaptureCondition *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sp_capture_condition_free (SpCaptureCondition *self)
|
sp_capture_condition_finalize (SpCaptureCondition *self)
|
||||||
{
|
{
|
||||||
switch (self->type)
|
switch (self->type)
|
||||||
{
|
{
|
||||||
case SP_CAPTURE_CONDITION_AND:
|
case SP_CAPTURE_CONDITION_AND:
|
||||||
sp_capture_condition_free (self->u.and.left);
|
sp_capture_condition_unref (self->u.and.left);
|
||||||
sp_capture_condition_free (self->u.and.right);
|
sp_capture_condition_unref (self->u.and.right);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SP_CAPTURE_CONDITION_WHERE_TYPE_IN:
|
case SP_CAPTURE_CONDITION_WHERE_TYPE_IN:
|
||||||
@ -217,10 +233,25 @@ sp_capture_condition_free (SpCaptureCondition *self)
|
|||||||
g_slice_free (SpCaptureCondition, self);
|
g_slice_free (SpCaptureCondition, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DEFINE_BOXED_TYPE (SpCaptureCondition,
|
SpCaptureCondition *
|
||||||
sp_capture_condition,
|
sp_capture_condition_ref (SpCaptureCondition *self)
|
||||||
sp_capture_condition_copy,
|
{
|
||||||
sp_capture_condition_free)
|
g_return_val_if_fail (self != NULL, NULL);
|
||||||
|
g_return_val_if_fail (self->ref_count > 0, NULL);
|
||||||
|
|
||||||
|
g_atomic_int_inc (&self->ref_count);
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
sp_capture_condition_unref (SpCaptureCondition *self)
|
||||||
|
{
|
||||||
|
g_return_if_fail (self != NULL);
|
||||||
|
g_return_if_fail (self->ref_count > 0);
|
||||||
|
|
||||||
|
if (g_atomic_int_dec_and_test (&self->ref_count))
|
||||||
|
sp_capture_condition_finalize (self);
|
||||||
|
}
|
||||||
|
|
||||||
SpCaptureCondition *
|
SpCaptureCondition *
|
||||||
sp_capture_condition_new_where_type_in (guint n_types,
|
sp_capture_condition_new_where_type_in (guint n_types,
|
||||||
@ -230,7 +261,7 @@ sp_capture_condition_new_where_type_in (guint n_types,
|
|||||||
|
|
||||||
g_return_val_if_fail (types != NULL, NULL);
|
g_return_val_if_fail (types != NULL, NULL);
|
||||||
|
|
||||||
self = g_slice_new0 (SpCaptureCondition);
|
self = sp_capture_condition_init ();
|
||||||
self->type = SP_CAPTURE_CONDITION_WHERE_TYPE_IN;
|
self->type = SP_CAPTURE_CONDITION_WHERE_TYPE_IN;
|
||||||
self->u.where_type_in = g_array_sized_new (FALSE, FALSE, sizeof (SpCaptureFrameType), n_types);
|
self->u.where_type_in = g_array_sized_new (FALSE, FALSE, sizeof (SpCaptureFrameType), n_types);
|
||||||
g_array_set_size (self->u.where_type_in, n_types);
|
g_array_set_size (self->u.where_type_in, n_types);
|
||||||
@ -252,7 +283,7 @@ sp_capture_condition_new_where_time_between (gint64 begin_time,
|
|||||||
end_time = tmp;
|
end_time = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
self = g_slice_new0 (SpCaptureCondition);
|
self = sp_capture_condition_init ();
|
||||||
self->type = SP_CAPTURE_CONDITION_WHERE_TIME_BETWEEN;
|
self->type = SP_CAPTURE_CONDITION_WHERE_TIME_BETWEEN;
|
||||||
self->u.where_time_between.begin = begin_time;
|
self->u.where_time_between.begin = begin_time;
|
||||||
self->u.where_time_between.end = end_time;
|
self->u.where_time_between.end = end_time;
|
||||||
@ -268,7 +299,7 @@ sp_capture_condition_new_where_pid_in (guint n_pids,
|
|||||||
|
|
||||||
g_return_val_if_fail (pids != NULL, NULL);
|
g_return_val_if_fail (pids != NULL, NULL);
|
||||||
|
|
||||||
self = g_slice_new0 (SpCaptureCondition);
|
self = sp_capture_condition_init ();
|
||||||
self->type = SP_CAPTURE_CONDITION_WHERE_PID_IN;
|
self->type = SP_CAPTURE_CONDITION_WHERE_PID_IN;
|
||||||
self->u.where_pid_in = g_array_sized_new (FALSE, FALSE, sizeof (gint32), n_pids);
|
self->u.where_pid_in = g_array_sized_new (FALSE, FALSE, sizeof (gint32), n_pids);
|
||||||
g_array_set_size (self->u.where_pid_in, n_pids);
|
g_array_set_size (self->u.where_pid_in, n_pids);
|
||||||
@ -285,7 +316,7 @@ sp_capture_condition_new_where_counter_in (guint n_counters,
|
|||||||
|
|
||||||
g_return_val_if_fail (counters != NULL || n_counters == 0, NULL);
|
g_return_val_if_fail (counters != NULL || n_counters == 0, NULL);
|
||||||
|
|
||||||
self = g_slice_new0 (SpCaptureCondition);
|
self = sp_capture_condition_init ();
|
||||||
self->type = SP_CAPTURE_CONDITION_WHERE_COUNTER_IN;
|
self->type = SP_CAPTURE_CONDITION_WHERE_COUNTER_IN;
|
||||||
self->u.where_counter_in = g_array_sized_new (FALSE, FALSE, sizeof (guint), n_counters);
|
self->u.where_counter_in = g_array_sized_new (FALSE, FALSE, sizeof (guint), n_counters);
|
||||||
|
|
||||||
@ -317,7 +348,7 @@ sp_capture_condition_new_and (SpCaptureCondition *left,
|
|||||||
g_return_val_if_fail (left != NULL, NULL);
|
g_return_val_if_fail (left != NULL, NULL);
|
||||||
g_return_val_if_fail (right != NULL, NULL);
|
g_return_val_if_fail (right != NULL, NULL);
|
||||||
|
|
||||||
self = g_slice_new0 (SpCaptureCondition);
|
self = sp_capture_condition_init ();
|
||||||
self->type = SP_CAPTURE_CONDITION_AND;
|
self->type = SP_CAPTURE_CONDITION_AND;
|
||||||
self->u.and.left = left;
|
self->u.and.left = left;
|
||||||
self->u.and.right = right;
|
self->u.and.right = right;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-condition.h
|
/* sp-capture-condition.h
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,20 +14,19 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CAPTURE_CONDITION_H
|
#pragma once
|
||||||
#define SP_CAPTURE_CONDITION_H
|
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include "sp-capture-types.h"
|
||||||
|
|
||||||
#include "capture/sp-capture-types.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SP_TYPE_CAPTURE_CONDITION (sp_capture_condition_get_type())
|
SpCaptureCondition *sp_capture_condition_copy (const SpCaptureCondition *self);
|
||||||
|
void sp_capture_condition_unref (SpCaptureCondition *self);
|
||||||
GType sp_capture_condition_get_type (void);
|
SpCaptureCondition *sp_capture_condition_ref (SpCaptureCondition *self);
|
||||||
SpCaptureCondition *sp_capture_condition_new_and (SpCaptureCondition *left,
|
SpCaptureCondition *sp_capture_condition_new_and (SpCaptureCondition *left,
|
||||||
SpCaptureCondition *right);
|
SpCaptureCondition *right);
|
||||||
SpCaptureCondition *sp_capture_condition_new_where_type_in (guint n_types,
|
SpCaptureCondition *sp_capture_condition_new_where_type_in (guint n_types,
|
||||||
@ -41,6 +40,6 @@ SpCaptureCondition *sp_capture_condition_new_where_counter_in (guint
|
|||||||
gboolean sp_capture_condition_match (const SpCaptureCondition *self,
|
gboolean sp_capture_condition_match (const SpCaptureCondition *self,
|
||||||
const SpCaptureFrame *frame);
|
const SpCaptureFrame *frame);
|
||||||
|
|
||||||
G_END_DECLS
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SpCaptureCondition, sp_capture_condition_unref)
|
||||||
|
|
||||||
#endif /* SP_CAPTURE_CONDITION_H */
|
G_END_DECLS
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-cursor.c
|
/* sp-capture-cursor.c
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,13 +14,17 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define G_LOG_DOMAIN "sp-capture-cursor"
|
#define G_LOG_DOMAIN "sp-capture-cursor"
|
||||||
|
|
||||||
#include "capture/sp-capture-condition.h"
|
#include "config.h"
|
||||||
#include "capture/sp-capture-cursor.h"
|
|
||||||
#include "capture/sp-capture-reader.h"
|
#include "sp-capture-condition.h"
|
||||||
|
#include "sp-capture-cursor.h"
|
||||||
|
#include "sp-capture-reader.h"
|
||||||
|
|
||||||
#define READ_DELEGATE(f) ((ReadDelegate)(f))
|
#define READ_DELEGATE(f) ((ReadDelegate)(f))
|
||||||
|
|
||||||
@ -28,51 +32,79 @@ typedef const SpCaptureFrame *(*ReadDelegate) (SpCaptureReader *);
|
|||||||
|
|
||||||
struct _SpCaptureCursor
|
struct _SpCaptureCursor
|
||||||
{
|
{
|
||||||
GObject parent_instance;
|
volatile gint ref_count;
|
||||||
GPtrArray *conditions;
|
GPtrArray *conditions;
|
||||||
SpCaptureReader *reader;
|
SpCaptureReader *reader;
|
||||||
guint reversed : 1;
|
guint reversed : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (SpCaptureCursor, sp_capture_cursor, G_TYPE_OBJECT)
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
destroy_condition (gpointer data)
|
sp_capture_cursor_finalize (SpCaptureCursor *self)
|
||||||
{
|
{
|
||||||
g_boxed_free (SP_TYPE_CAPTURE_CONDITION, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
sp_capture_cursor_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
SpCaptureCursor *self = (SpCaptureCursor *)object;
|
|
||||||
|
|
||||||
g_clear_pointer (&self->conditions, g_ptr_array_unref);
|
g_clear_pointer (&self->conditions, g_ptr_array_unref);
|
||||||
g_clear_pointer (&self->reader, sp_capture_reader_unref);
|
g_clear_pointer (&self->reader, sp_capture_reader_unref);
|
||||||
|
g_slice_free (SpCaptureCursor, self);
|
||||||
G_OBJECT_CLASS (sp_capture_cursor_parent_class)->finalize (object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static SpCaptureCursor *
|
||||||
sp_capture_cursor_class_init (SpCaptureCursorClass *klass)
|
sp_capture_cursor_init (void)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
SpCaptureCursor *self;
|
||||||
|
|
||||||
object_class->finalize = sp_capture_cursor_finalize;
|
self = g_slice_new0 (SpCaptureCursor);
|
||||||
|
self->conditions = g_ptr_array_new_with_free_func ((GDestroyNotify) sp_capture_condition_unref);
|
||||||
|
self->ref_count = 1;
|
||||||
|
|
||||||
|
return g_steal_pointer (&self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/**
|
||||||
sp_capture_cursor_init (SpCaptureCursor *self)
|
* sp_capture_cursor_ref:
|
||||||
|
* @self: a #SpCaptureCursor
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): @self
|
||||||
|
*
|
||||||
|
* Since: 3.34
|
||||||
|
*/
|
||||||
|
SpCaptureCursor *
|
||||||
|
sp_capture_cursor_ref (SpCaptureCursor *self)
|
||||||
{
|
{
|
||||||
self->conditions = g_ptr_array_new_with_free_func (destroy_condition);
|
g_return_val_if_fail (self != NULL, NULL);
|
||||||
|
g_return_val_if_fail (self->ref_count > 0, NULL);
|
||||||
|
|
||||||
|
g_atomic_int_inc (&self->ref_count);
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sp_capture_cursor_unref:
|
||||||
|
* @self: a #SpCaptureCursor
|
||||||
|
*
|
||||||
|
* Since: 3.34
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
sp_capture_cursor_unref (SpCaptureCursor *self)
|
||||||
|
{
|
||||||
|
g_return_if_fail (self != NULL);
|
||||||
|
g_return_if_fail (self->ref_count > 0);
|
||||||
|
|
||||||
|
if (g_atomic_int_dec_and_test (&self->ref_count))
|
||||||
|
sp_capture_cursor_finalize (self);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sp_capture_cursor_foreach:
|
||||||
|
* @self: a #SpCaptureCursor
|
||||||
|
* @callback: (scope call): a closure to execute
|
||||||
|
* @user_data: user data for @callback
|
||||||
|
*
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
sp_capture_cursor_foreach (SpCaptureCursor *self,
|
sp_capture_cursor_foreach (SpCaptureCursor *self,
|
||||||
SpCaptureCursorCallback callback,
|
SpCaptureCursorCallback callback,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SP_IS_CAPTURE_CURSOR (self));
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (self->reader != NULL);
|
g_return_if_fail (self->reader != NULL);
|
||||||
g_return_if_fail (callback != NULL);
|
g_return_if_fail (callback != NULL);
|
||||||
|
|
||||||
@ -165,7 +197,7 @@ sp_capture_cursor_foreach (SpCaptureCursor *self,
|
|||||||
void
|
void
|
||||||
sp_capture_cursor_reset (SpCaptureCursor *self)
|
sp_capture_cursor_reset (SpCaptureCursor *self)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SP_IS_CAPTURE_CURSOR (self));
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (self->reader != NULL);
|
g_return_if_fail (self->reader != NULL);
|
||||||
|
|
||||||
sp_capture_reader_reset (self->reader);
|
sp_capture_reader_reset (self->reader);
|
||||||
@ -174,7 +206,7 @@ sp_capture_cursor_reset (SpCaptureCursor *self)
|
|||||||
void
|
void
|
||||||
sp_capture_cursor_reverse (SpCaptureCursor *self)
|
sp_capture_cursor_reverse (SpCaptureCursor *self)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SP_IS_CAPTURE_CURSOR (self));
|
g_return_if_fail (self != NULL);
|
||||||
|
|
||||||
self->reversed = !self->reversed;
|
self->reversed = !self->reversed;
|
||||||
}
|
}
|
||||||
@ -191,12 +223,18 @@ void
|
|||||||
sp_capture_cursor_add_condition (SpCaptureCursor *self,
|
sp_capture_cursor_add_condition (SpCaptureCursor *self,
|
||||||
SpCaptureCondition *condition)
|
SpCaptureCondition *condition)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SP_IS_CAPTURE_CURSOR (self));
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (condition != NULL);
|
g_return_if_fail (condition != NULL);
|
||||||
|
|
||||||
g_ptr_array_add (self->conditions, condition);
|
g_ptr_array_add (self->conditions, condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sp_capture_cursor_new:
|
||||||
|
* @self: a #SpCaptureCursor
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): a new cursor for @reader
|
||||||
|
*/
|
||||||
SpCaptureCursor *
|
SpCaptureCursor *
|
||||||
sp_capture_cursor_new (SpCaptureReader *reader)
|
sp_capture_cursor_new (SpCaptureReader *reader)
|
||||||
{
|
{
|
||||||
@ -204,7 +242,7 @@ sp_capture_cursor_new (SpCaptureReader *reader)
|
|||||||
|
|
||||||
g_return_val_if_fail (reader != NULL, NULL);
|
g_return_val_if_fail (reader != NULL, NULL);
|
||||||
|
|
||||||
self = g_object_new (SP_TYPE_CAPTURE_CURSOR, NULL);
|
self = sp_capture_cursor_init ();
|
||||||
self->reader = sp_capture_reader_copy (reader);
|
self->reader = sp_capture_reader_copy (reader);
|
||||||
sp_capture_reader_reset (self->reader);
|
sp_capture_reader_reset (self->reader);
|
||||||
|
|
||||||
@ -221,7 +259,7 @@ sp_capture_cursor_new (SpCaptureReader *reader)
|
|||||||
SpCaptureReader *
|
SpCaptureReader *
|
||||||
sp_capture_cursor_get_reader (SpCaptureCursor *self)
|
sp_capture_cursor_get_reader (SpCaptureCursor *self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (SP_IS_CAPTURE_CURSOR (self), NULL);
|
g_return_val_if_fail (self != NULL, NULL);
|
||||||
|
|
||||||
return self->reader;
|
return self->reader;
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-cursor.h
|
/* sp-capture-cursor.h
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,18 +14,17 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CAPTURE_CURSOR_H
|
#pragma once
|
||||||
#define SP_CAPTURE_CURSOR_H
|
|
||||||
|
|
||||||
#include "capture/sp-capture-types.h"
|
#include "sp-capture-types.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SP_TYPE_CAPTURE_CURSOR (sp_capture_cursor_get_type())
|
typedef struct _SpCaptureCursor SpCaptureCursor;
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (SpCaptureCursor, sp_capture_cursor, SP, CAPTURE_CURSOR, GObject)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SpCaptureCursorCallback:
|
* SpCaptureCursorCallback:
|
||||||
@ -42,6 +41,8 @@ typedef gboolean (*SpCaptureCursorCallback) (const SpCaptureFrame *frame,
|
|||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
SpCaptureCursor *sp_capture_cursor_new (SpCaptureReader *reader);
|
SpCaptureCursor *sp_capture_cursor_new (SpCaptureReader *reader);
|
||||||
|
void sp_capture_cursor_unref (SpCaptureCursor *self);
|
||||||
|
SpCaptureCursor *sp_capture_cursor_ref (SpCaptureCursor *self);
|
||||||
SpCaptureReader *sp_capture_cursor_get_reader (SpCaptureCursor *self);
|
SpCaptureReader *sp_capture_cursor_get_reader (SpCaptureCursor *self);
|
||||||
void sp_capture_cursor_foreach (SpCaptureCursor *self,
|
void sp_capture_cursor_foreach (SpCaptureCursor *self,
|
||||||
SpCaptureCursorCallback callback,
|
SpCaptureCursorCallback callback,
|
||||||
@ -51,6 +52,6 @@ void sp_capture_cursor_reverse (SpCaptureCursor *self
|
|||||||
void sp_capture_cursor_add_condition (SpCaptureCursor *self,
|
void sp_capture_cursor_add_condition (SpCaptureCursor *self,
|
||||||
SpCaptureCondition *condition);
|
SpCaptureCondition *condition);
|
||||||
|
|
||||||
G_END_DECLS
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SpCaptureCursor, sp_capture_cursor_unref)
|
||||||
|
|
||||||
#endif /* SP_CAPTURE_CURSOR_H */
|
G_END_DECLS
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-reader.c
|
/* sp-capture-reader.c
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,6 +14,8 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -23,9 +25,9 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "capture/sp-capture-reader.h"
|
#include "sp-capture-reader.h"
|
||||||
#include "capture/sp-capture-util-private.h"
|
#include "sp-capture-util-private.h"
|
||||||
#include "capture/sp-capture-writer.h"
|
#include "sp-capture-writer.h"
|
||||||
|
|
||||||
struct _SpCaptureReader
|
struct _SpCaptureReader
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-reader.h
|
/* sp-capture-reader.h
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,12 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CAPTURE_READER_H
|
#pragma once
|
||||||
#define SP_CAPTURE_READER_H
|
|
||||||
|
|
||||||
#include "capture/sp-capture-types.h"
|
#include "sp-capture-types.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -69,5 +70,3 @@ gboolean sp_capture_reader_save_as (SpCapt
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* SP_CAPTURE_READER_H */
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-types.h
|
/* sp-capture-types.h
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,17 +14,14 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CAPTURE_FORMAT_H
|
#pragma once
|
||||||
#define SP_CAPTURE_FORMAT_H
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#ifdef SP_ENABLE_GOBJECT
|
|
||||||
# include <glib-object.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sp-clock.h"
|
#include "sp-clock.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@ -257,5 +254,3 @@ sp_capture_address_compare (SpCaptureAddress a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* SP_CAPTURE_FORMAT_H */
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-util-private.h
|
/* sp-capture-util-private.h
|
||||||
*
|
*
|
||||||
* Copyright © 2019 Christian Hergert <chergert@redhat.com>
|
* Copyright 2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,10 +14,11 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CAPTURE_UTIL_PRIVATE_H
|
#pragma once
|
||||||
#define SP_CAPTURE_UTIL_PRIVATE_H
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@ -53,5 +54,3 @@ ssize_t _sp_sendfile (int out_fd,
|
|||||||
off_t *offset,
|
off_t *offset,
|
||||||
size_t count);
|
size_t count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SP_CAPTURE_UTIL_PRIVATE_H */
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-util.c
|
/* sp-capture-util.c
|
||||||
*
|
*
|
||||||
* Copyright © 2019 Christian Hergert <chergert@redhat.com>
|
* Copyright 2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,6 +14,8 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-writer.c
|
/* sp-capture-writer.c
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,6 +14,8 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
@ -29,9 +31,9 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "capture/sp-capture-reader.h"
|
#include "sp-capture-reader.h"
|
||||||
#include "capture/sp-capture-util-private.h"
|
#include "sp-capture-util-private.h"
|
||||||
#include "capture/sp-capture-writer.h"
|
#include "sp-capture-writer.h"
|
||||||
|
|
||||||
#define DEFAULT_BUFFER_SIZE (_sp_getpagesize() * 64L)
|
#define DEFAULT_BUFFER_SIZE (_sp_getpagesize() * 64L)
|
||||||
#define INVALID_ADDRESS (G_GUINT64_CONSTANT(0))
|
#define INVALID_ADDRESS (G_GUINT64_CONSTANT(0))
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-capture-writer.h
|
/* sp-capture-writer.h
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,12 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CAPTURE_WRITER_H
|
#pragma once
|
||||||
#define SP_CAPTURE_WRITER_H
|
|
||||||
|
|
||||||
#include "capture/sp-capture-types.h"
|
#include "sp-capture-types.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -131,5 +132,3 @@ gboolean _sp_capture_writer_set_time_range (SpCaptureWriter *
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* SP_CAPTURE_WRITER_H */
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sysprof-capture.h
|
/* sysprof-capture.h
|
||||||
*
|
*
|
||||||
* Copyright © 2018 Christian Hergert <chergert@redhat.com>
|
* Copyright 2018-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,27 +14,27 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SYSPROF_CAPTURE_H
|
#pragma once
|
||||||
#define SYSPROF_CAPTURE_H
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SYSPROF_INSIDE
|
#define SYSPROF_CAPTURE_INSIDE
|
||||||
|
|
||||||
# include "sp-address.h"
|
# include "sp-address.h"
|
||||||
|
# include "sp-capture-condition.h"
|
||||||
|
# include "sp-capture-cursor.h"
|
||||||
|
# include "sp-capture-reader.h"
|
||||||
|
# include "sp-capture-writer.h"
|
||||||
# include "sp-clock.h"
|
# include "sp-clock.h"
|
||||||
# include "sp-error.h"
|
# include "sp-error.h"
|
||||||
# include "sysprof-version.h"
|
# include "sysprof-version.h"
|
||||||
|
|
||||||
# include "capture/sp-capture-reader.h"
|
#undef SYSPROF_CAPTURE_INSIDE
|
||||||
# include "capture/sp-capture-writer.h"
|
|
||||||
|
|
||||||
#undef SYSPROF_INSIDE
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* SYSPROF_CAPTURE_H */
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sysprof-version.h.in
|
/* sysprof-version.h.in
|
||||||
*
|
*
|
||||||
* Copyright © 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This file is free software; you can redistribute it and/or modify it under
|
* This file is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU Lesser General Public License as published by the Free
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
@ -14,13 +14,14 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SYSPROF_VERSION_H
|
#pragma once
|
||||||
#define SYSPROF_VERSION_H
|
|
||||||
|
|
||||||
#if !defined(SYSPROF_INSIDE) && !defined(SYSPROF_COMPILATION)
|
#if !defined(SYSPROF_CAPTURE_INSIDE) && !defined(SYSPROF_CAPTURE_COMPILATION)
|
||||||
# error "Only <sysprof.h> can be included directly."
|
# error "Only <sysprof-capture.h> can be included directly."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,4 +95,3 @@
|
|||||||
(SYSPROF_MAJOR_VERSION == (major) && SYSPROF_MINOR_VERSION == (minor) && \
|
(SYSPROF_MAJOR_VERSION == (major) && SYSPROF_MINOR_VERSION == (minor) && \
|
||||||
SYSPROF_MICRO_VERSION >= (micro)))
|
SYSPROF_MICRO_VERSION >= (micro)))
|
||||||
|
|
||||||
#endif /* SYSPROF_VERSION_H */
|
|
||||||
85
src/libsysprof-ui/meson.build
Normal file
85
src/libsysprof-ui/meson.build
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
libsysprof_ui_public_sources = [
|
||||||
|
'sp-callgraph-view.c',
|
||||||
|
'sp-color-cycle.c',
|
||||||
|
'sp-cpu-visualizer-row.c',
|
||||||
|
'sp-empty-state-view.c',
|
||||||
|
'sp-failed-state-view.c',
|
||||||
|
'sp-line-visualizer-row.c',
|
||||||
|
'sp-mark-visualizer-row.c',
|
||||||
|
'sp-model-filter.c',
|
||||||
|
'sp-multi-paned.c',
|
||||||
|
'sp-process-model-row.c',
|
||||||
|
'sp-profiler-menu-button.c',
|
||||||
|
'sp-recording-state-view.c',
|
||||||
|
'sp-visualizer-list.c',
|
||||||
|
'sp-visualizer-row.c',
|
||||||
|
'sp-visualizer-ticks.c',
|
||||||
|
'sp-visualizer-view.c',
|
||||||
|
'sp-zoom-manager.c',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_ui_private_sources = [
|
||||||
|
'pointcache.c',
|
||||||
|
'rectangles.c',
|
||||||
|
'sp-cell-renderer-percent.c',
|
||||||
|
'sp-theme-manager.c',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_ui_public_headers = [
|
||||||
|
'sp-callgraph-view.h',
|
||||||
|
'sp-cell-renderer-percent.h',
|
||||||
|
'sp-cpu-visualizer-row.h',
|
||||||
|
'sp-empty-state-view.h',
|
||||||
|
'sp-failed-state-view.h',
|
||||||
|
'sp-line-visualizer-row.h',
|
||||||
|
'sp-mark-visualizer-row.h',
|
||||||
|
'sp-model-filter.h',
|
||||||
|
'sp-multi-paned.h',
|
||||||
|
'sp-process-model-row.h',
|
||||||
|
'sp-profiler-menu-button.h',
|
||||||
|
'sp-recording-state-view.h',
|
||||||
|
'sp-visualizer-list.h',
|
||||||
|
'sp-visualizer-row.h',
|
||||||
|
'sp-visualizer-ticks.h',
|
||||||
|
'sp-visualizer-view.h',
|
||||||
|
'sp-zoom-manager.h',
|
||||||
|
'sysprof-ui.h',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_ui_resources = gnome.compile_resources(
|
||||||
|
'libsysprof-ui-resources',
|
||||||
|
'libsysprof-ui.gresource.xml',
|
||||||
|
c_name: 'lisysprof_ui',
|
||||||
|
)
|
||||||
|
|
||||||
|
libsysprof_ui_deps = [
|
||||||
|
dependency('gio-2.0', version: glib_req_version),
|
||||||
|
dependency('gtk+-3.0', version: gtk_req_version),
|
||||||
|
libsysprof_dep,
|
||||||
|
libshared_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_ui = shared_library('sysprof-ui-@0@'.format(libsysprof_api_version),
|
||||||
|
libsysprof_ui_public_sources + libsysprof_ui_private_sources + libsysprof_ui_resources,
|
||||||
|
dependencies: libsysprof_ui_deps,
|
||||||
|
install_dir: get_option('libdir'),
|
||||||
|
install: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
libsysprof_ui_dep = declare_dependency(
|
||||||
|
link_with: libsysprof_ui,
|
||||||
|
dependencies: libsysprof_ui_deps,
|
||||||
|
include_directories: include_directories('.'),
|
||||||
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(
|
||||||
|
subdirs: [ sysprof_header_subdir ],
|
||||||
|
version: meson.project_version(),
|
||||||
|
name: 'sysprof-ui-@0@'.format(libsysprof_api_version),
|
||||||
|
filebase: 'sysprof-ui-@0@'.format(libsysprof_api_version),
|
||||||
|
description: 'The UI library for GTK applications embedding sysprof',
|
||||||
|
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||||
|
requires: [ 'gio-2.0', 'gtk+-3.0' ],
|
||||||
|
)
|
||||||
|
|
||||||
|
install_headers(libsysprof_ui_public_headers, subdir: sysprof_header_subdir)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* pointcache.c
|
/* pointcache.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,11 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define G_LOG_DOMAIN "pointcache"
|
#define G_LOG_DOMAIN "pointcache"
|
||||||
|
|
||||||
#include "util/pointcache.h"
|
#include "pointcache.h"
|
||||||
|
|
||||||
struct _PointCache
|
struct _PointCache
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* pointcache.h
|
/* pointcache.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef POINT_CACHE_H
|
#ifndef POINT_CACHE_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* rectangles.c
|
/* rectangles.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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,9 +18,9 @@
|
|||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "util/rectangles.h"
|
#include "rectangles.h"
|
||||||
#include "util/sp-color-cycle.h"
|
#include "sp-color-cycle.h"
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* rectangles.h
|
/* rectangles.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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-callgraph-view.c
|
/* sp-callgraph-view.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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
|
/* Sysprof -- Sampling, systemwide CPU profiler
|
||||||
@ -37,9 +39,9 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include "callgraph/sp-callgraph-profile-private.h"
|
#include "sp-callgraph-profile-private.h"
|
||||||
#include "callgraph/sp-callgraph-view.h"
|
#include "sp-callgraph-view.h"
|
||||||
#include "widgets/sp-cell-renderer-percent.h"
|
#include "sp-cell-renderer-percent.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-callgraph-view.h
|
/* sp-callgraph-view.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CALLGRAPH_VIEW_H
|
#ifndef SP_CALLGRAPH_VIEW_H
|
||||||
@ -21,7 +23,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "callgraph/sp-callgraph-profile.h"
|
#include "sp-callgraph-profile.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-cell-renderer-percent.c
|
/* sp-cell-renderer-percent.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,11 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include "widgets/sp-cell-renderer-percent.h"
|
#include "sp-cell-renderer-percent.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-cell-renderer-percent.h
|
/* sp-cell-renderer-percent.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CELL_RENDERER_PERCENT_H
|
#ifndef SP_CELL_RENDERER_PERCENT_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-color-cycle.c
|
/* sp-color-cycle.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,11 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-color-cycle"
|
#define G_LOG_DOMAIN "sp-color-cycle"
|
||||||
|
|
||||||
#include "util/sp-color-cycle.h"
|
#include "sp-color-cycle.h"
|
||||||
|
|
||||||
G_DEFINE_BOXED_TYPE (SpColorCycle, sp_color_cycle, sp_color_cycle_ref, sp_color_cycle_unref)
|
G_DEFINE_BOXED_TYPE (SpColorCycle, sp_color_cycle, sp_color_cycle_ref, sp_color_cycle_unref)
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-color-cycle.h
|
/* sp-color-cycle.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_COLOR_CYCLE_H
|
#ifndef SP_COLOR_CYCLE_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-cpu-visualizer-row.c
|
/* sp-cpu-visualizer-row.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,14 +14,16 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-cpu-visualizer-row"
|
#define G_LOG_DOMAIN "sp-cpu-visualizer-row"
|
||||||
|
|
||||||
#include "capture/sp-capture-condition.h"
|
#include "sp-capture-condition.h"
|
||||||
#include "capture/sp-capture-cursor.h"
|
#include "sp-capture-cursor.h"
|
||||||
#include "util/sp-color-cycle.h"
|
#include "sp-color-cycle.h"
|
||||||
#include "visualizers/sp-cpu-visualizer-row.h"
|
#include "sp-cpu-visualizer-row.h"
|
||||||
|
|
||||||
struct _SpCpuVisualizerRow
|
struct _SpCpuVisualizerRow
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-cpu-visualizer-row.h
|
/* sp-cpu-visualizer-row.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,12 +14,14 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_CPU_VISUALIZER_ROW_H
|
#ifndef SP_CPU_VISUALIZER_ROW_H
|
||||||
#define SP_CPU_VISUALIZER_ROW_H
|
#define SP_CPU_VISUALIZER_ROW_H
|
||||||
|
|
||||||
#include "visualizers/sp-line-visualizer-row.h"
|
#include "sp-line-visualizer-row.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-empty-state-view.c
|
/* sp-empty-state-view.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,13 +14,15 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-empty-state-view"
|
#define G_LOG_DOMAIN "sp-empty-state-view"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "widgets/sp-empty-state-view.h"
|
#include "sp-empty-state-view.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-empty-state-view.h
|
/* sp-empty-state-view.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_EMPTY_STATE_VIEW_H
|
#ifndef SP_EMPTY_STATE_VIEW_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-failed-state-view.c
|
/* sp-failed-state-view.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,9 +14,11 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "widgets/sp-failed-state-view.h"
|
#include "sp-failed-state-view.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (SpFailedStateView, sp_failed_state_view, GTK_TYPE_BIN)
|
G_DEFINE_TYPE (SpFailedStateView, sp_failed_state_view, GTK_TYPE_BIN)
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-failed-state-view.h
|
/* sp-failed-state-view.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_FAILED_STATE_VIEW_H
|
#ifndef SP_FAILED_STATE_VIEW_H
|
||||||
@ -21,7 +23,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "profiler/sp-profiler.h"
|
#include "sp-profiler.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-line-visualizer-row.c
|
/* sp-line-visualizer-row.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-line-visualizer-row"
|
#define G_LOG_DOMAIN "sp-line-visualizer-row"
|
||||||
@ -21,10 +23,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util/pointcache.h"
|
#include "pointcache.h"
|
||||||
#include "capture/sp-capture-condition.h"
|
#include "sp-capture-condition.h"
|
||||||
#include "capture/sp-capture-cursor.h"
|
#include "sp-capture-cursor.h"
|
||||||
#include "visualizers/sp-line-visualizer-row.h"
|
#include "sp-line-visualizer-row.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -119,7 +121,7 @@ load_data_free (gpointer data)
|
|||||||
if (load != NULL)
|
if (load != NULL)
|
||||||
{
|
{
|
||||||
g_clear_pointer (&load->lines, g_array_unref);
|
g_clear_pointer (&load->lines, g_array_unref);
|
||||||
g_clear_object (&load->cursor);
|
g_clear_pointer (&load->cursor, sp_capture_cursor_unref);
|
||||||
g_clear_pointer (&load->cache, point_cache_unref);
|
g_clear_pointer (&load->cache, point_cache_unref);
|
||||||
g_slice_free (LoadData, load);
|
g_slice_free (LoadData, load);
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-line-visualizer-row.h
|
/* sp-line-visualizer-row.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,12 +14,14 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_LINE_VISUALIZER_ROW_H
|
#ifndef SP_LINE_VISUALIZER_ROW_H
|
||||||
#define SP_LINE_VISUALIZER_ROW_H
|
#define SP_LINE_VISUALIZER_ROW_H
|
||||||
|
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-mark-visualizer-row.c
|
/* sp-mark-visualizer-row.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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,14 +14,16 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-mark-visualizer-row"
|
#define G_LOG_DOMAIN "sp-mark-visualizer-row"
|
||||||
|
|
||||||
#include "capture/sp-capture-condition.h"
|
#include "sp-capture-condition.h"
|
||||||
#include "capture/sp-capture-cursor.h"
|
#include "sp-capture-cursor.h"
|
||||||
#include "util/rectangles.h"
|
#include "rectangles.h"
|
||||||
#include "visualizers/sp-mark-visualizer-row.h"
|
#include "sp-mark-visualizer-row.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -204,7 +206,7 @@ sp_mark_visualizer_row_worker (GTask *task,
|
|||||||
g_assert (G_IS_TASK (task));
|
g_assert (G_IS_TASK (task));
|
||||||
g_assert (SP_IS_MARK_VISUALIZER_ROW (source_object));
|
g_assert (SP_IS_MARK_VISUALIZER_ROW (source_object));
|
||||||
g_assert (state != NULL);
|
g_assert (state != NULL);
|
||||||
g_assert (SP_IS_CAPTURE_CURSOR (state->cursor));
|
g_assert (state->cursor != NULL);
|
||||||
|
|
||||||
sp_capture_cursor_foreach (state->cursor, sp_mark_visualizer_row_add_rect, state);
|
sp_capture_cursor_foreach (state->cursor, sp_mark_visualizer_row_add_rect, state);
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-mark-visualizer-row.h
|
/* sp-mark-visualizer-row.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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,11 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-model-filter.c
|
/* sp-model-filter.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,9 +14,11 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "util/sp-model-filter.h"
|
#include "sp-model-filter.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-model-filter.h
|
/* sp-model-filter.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_MODEL_FILTER_H
|
#ifndef SP_MODEL_FILTER_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-multi-paned.c
|
/* sp-multi-paned.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -15,9 +15,11 @@
|
|||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "widgets/sp-multi-paned.h"
|
#include "sp-multi-paned.h"
|
||||||
|
|
||||||
#define HANDLE_WIDTH 10
|
#define HANDLE_WIDTH 10
|
||||||
#define HANDLE_HEIGHT 10
|
#define HANDLE_HEIGHT 10
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-multi-paned.h
|
/* sp-multi-paned.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@ -15,6 +15,8 @@
|
|||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_MULTI_PANED_H
|
#ifndef SP_MULTI_PANED_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-process-model-row.c
|
/* sp-process-model-row.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,9 +14,11 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "widgets/sp-process-model-row.h"
|
#include "sp-process-model-row.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-process-model-row.h
|
/* sp-process-model-row.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_PROCESS_MODEL_ROW_H
|
#ifndef SP_PROCESS_MODEL_ROW_H
|
||||||
@ -21,7 +23,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "util/sp-process-model-item.h"
|
#include "sp-process-model-item.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-profiler-menu-button.c
|
/* sp-profiler-menu-button.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,16 +14,18 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "util/sp-model-filter.h"
|
#include "sp-model-filter.h"
|
||||||
#include "util/sp-process-model.h"
|
#include "sp-process-model.h"
|
||||||
#include "util/sp-process-model-item.h"
|
#include "sp-process-model-item.h"
|
||||||
#include "widgets/sp-process-model-row.h"
|
#include "sp-process-model-row.h"
|
||||||
#include "widgets/sp-profiler-menu-button.h"
|
#include "sp-profiler-menu-button.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-profiler-menu-button.h
|
/* sp-profiler-menu-button.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_PROFILER_MENU_BUTTON_H
|
#ifndef SP_PROFILER_MENU_BUTTON_H
|
||||||
@ -21,7 +23,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "profiler/sp-profiler.h"
|
#include "sp-profiler.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-recording-state-view.c
|
/* sp-recording-state-view.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,9 +14,11 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "widgets/sp-recording-state-view.h"
|
#include "sp-recording-state-view.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-recording-state-view.h
|
/* sp-recording-state-view.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_RECORDING_STATE_VIEW_H
|
#ifndef SP_RECORDING_STATE_VIEW_H
|
||||||
@ -21,7 +23,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "profiler/sp-profiler.h"
|
#include "sp-profiler.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-theme-manager.c
|
/* sp-theme-manager.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,11 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-theme-manager"
|
#define G_LOG_DOMAIN "sp-theme-manager"
|
||||||
|
|
||||||
#include "util/sp-theme-manager.h"
|
#include "sp-theme-manager.h"
|
||||||
|
|
||||||
struct _SpThemeManager
|
struct _SpThemeManager
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-theme-manager.h
|
/* sp-theme-manager.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_THEME_MANAGER_H
|
#ifndef SP_THEME_MANAGER_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-list.c
|
/* sp-visualizer-list.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,19 +14,20 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-visualizer-list"
|
#define G_LOG_DOMAIN "sp-visualizer-list"
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
#include <sysprof.h>
|
||||||
|
|
||||||
#include "capture/sp-capture-condition.h"
|
#include "sp-cpu-visualizer-row.h"
|
||||||
#include "capture/sp-capture-cursor.h"
|
#include "sp-visualizer-list.h"
|
||||||
#include "visualizers/sp-cpu-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
#include "visualizers/sp-visualizer-list.h"
|
#include "sp-mark-visualizer-row.h"
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-zoom-manager.h"
|
||||||
#include "visualizers/sp-mark-visualizer-row.h"
|
|
||||||
#include "util/sp-zoom-manager.h"
|
|
||||||
|
|
||||||
#define NSEC_PER_SEC G_GUINT64_CONSTANT(1000000000)
|
#define NSEC_PER_SEC G_GUINT64_CONSTANT(1000000000)
|
||||||
#define DEFAULT_PIXELS_PER_SECOND 20
|
#define DEFAULT_PIXELS_PER_SECOND 20
|
||||||
@ -64,7 +65,7 @@ discovery_free (Discovery *state)
|
|||||||
{
|
{
|
||||||
g_clear_pointer (&state->mark_groups, g_hash_table_unref);
|
g_clear_pointer (&state->mark_groups, g_hash_table_unref);
|
||||||
g_clear_pointer (&state->memory, g_array_unref);
|
g_clear_pointer (&state->memory, g_array_unref);
|
||||||
g_clear_object (&state->cursor);
|
g_clear_pointer (&state->cursor, sp_capture_cursor_unref);
|
||||||
g_slice_free (Discovery, state);
|
g_slice_free (Discovery, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +259,7 @@ discover_new_rows_worker (GTask *task,
|
|||||||
Discovery *state = task_data;
|
Discovery *state = task_data;
|
||||||
|
|
||||||
g_assert (state != NULL);
|
g_assert (state != NULL);
|
||||||
g_assert (SP_IS_CAPTURE_CURSOR (state->cursor));
|
g_assert (state->cursor != NULL);
|
||||||
|
|
||||||
sp_capture_cursor_foreach (state->cursor, discover_new_rows_frame_cb, state);
|
sp_capture_cursor_foreach (state->cursor, discover_new_rows_frame_cb, state);
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-list.h
|
/* sp-visualizer-list.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_VISUALIZER_LIST_H
|
#ifndef SP_VISUALIZER_LIST_H
|
||||||
@ -21,8 +23,8 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "capture/sp-capture-reader.h"
|
#include "sp-capture-reader.h"
|
||||||
#include "util/sp-zoom-manager.h"
|
#include "sp-zoom-manager.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-row-private.h
|
/* sp-visualizer-row-private.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,12 +14,14 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_VISUALIZER_ROW_PRIVATE_H
|
#ifndef SP_VISUALIZER_ROW_PRIVATE_H
|
||||||
#define SP_VISUALIZER_ROW_PRIVATE_H
|
#define SP_VISUALIZER_ROW_PRIVATE_H
|
||||||
|
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-row.c
|
/* sp-visualizer-row.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,12 +14,14 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-visualizer-row"
|
#define G_LOG_DOMAIN "sp-visualizer-row"
|
||||||
|
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
#include "visualizers/sp-visualizer-row-private.h"
|
#include "sp-visualizer-row-private.h"
|
||||||
|
|
||||||
#define NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
#define NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
||||||
#define DEFAULT_PIXELS_PER_SECOND 20
|
#define DEFAULT_PIXELS_PER_SECOND 20
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-row.h
|
/* sp-visualizer-row.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_VISUALIZER_ROW_H
|
#ifndef SP_VISUALIZER_ROW_H
|
||||||
@ -21,8 +23,8 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "capture/sp-capture-reader.h"
|
#include "sp-capture-reader.h"
|
||||||
#include "util/sp-zoom-manager.h"
|
#include "sp-zoom-manager.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-ticks.c
|
/* sp-visualizer-ticks.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,11 +14,13 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include "visualizers/sp-visualizer-ticks.h"
|
#include "sp-visualizer-ticks.h"
|
||||||
|
|
||||||
#define NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
#define NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
||||||
#define NSEC_PER_HOUR (NSEC_PER_SEC * 60 * 60)
|
#define NSEC_PER_HOUR (NSEC_PER_SEC * 60 * 60)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-ticks.h
|
/* sp-visualizer-ticks.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_VISUALIZER_TICKS_H
|
#ifndef SP_VISUALIZER_TICKS_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-view.c
|
/* sp-visualizer-view.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,19 +14,21 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-visualizer-view"
|
#define G_LOG_DOMAIN "sp-visualizer-view"
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include "util/sp-theme-manager.h"
|
#include "sp-theme-manager.h"
|
||||||
#include "visualizers/sp-visualizer-list.h"
|
#include "sp-visualizer-list.h"
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
#include "visualizers/sp-visualizer-row-private.h"
|
#include "sp-visualizer-row-private.h"
|
||||||
#include "util/sp-selection.h"
|
#include "sp-selection.h"
|
||||||
#include "visualizers/sp-visualizer-ticks.h"
|
#include "sp-visualizer-ticks.h"
|
||||||
#include "visualizers/sp-visualizer-view.h"
|
#include "sp-visualizer-view.h"
|
||||||
|
|
||||||
#define NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
#define NSEC_PER_SEC G_GINT64_CONSTANT(1000000000)
|
||||||
#define DEFAULT_PIXELS_PER_SECOND 20
|
#define DEFAULT_PIXELS_PER_SECOND 20
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-visualizer-view.h
|
/* sp-visualizer-view.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -14,16 +14,19 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_VISUALIZER_VIEW_H
|
#ifndef SP_VISUALIZER_VIEW_H
|
||||||
#define SP_VISUALIZER_VIEW_H
|
#define SP_VISUALIZER_VIEW_H
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include <sysprof.h>
|
||||||
|
|
||||||
#include "visualizers/sp-visualizer-row.h"
|
#include "sp-visualizer-row.h"
|
||||||
#include "util/sp-selection.h"
|
#include "sp-selection.h"
|
||||||
#include "util/sp-zoom-manager.h"
|
#include "sp-zoom-manager.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-zoom-manager.c
|
/* sp-zoom-manager.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* 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-zoom-manager"
|
#define G_LOG_DOMAIN "sp-zoom-manager"
|
||||||
@ -21,7 +23,7 @@
|
|||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
|
||||||
#include "util/sp-zoom-manager.h"
|
#include "sp-zoom-manager.h"
|
||||||
|
|
||||||
struct _SpZoomManager
|
struct _SpZoomManager
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-zoom-manager.h
|
/* sp-zoom-manager.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SP_ZOOM_MANAGER_H
|
#ifndef SP_ZOOM_MANAGER_H
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sysprof-ui.h
|
/* sysprof-ui.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 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
|
* 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
|
* 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
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SYSPROF_UI_H
|
#ifndef SYSPROF_UI_H
|
||||||
@ -24,22 +26,22 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SYSPROF_INSIDE
|
#define SYSPROF_INSIDE
|
||||||
# include "callgraph/sp-callgraph-view.h"
|
# include "sp-callgraph-view.h"
|
||||||
# include "widgets/sp-cell-renderer-percent.h"
|
# include "sp-cell-renderer-percent.h"
|
||||||
# include "visualizers/sp-cpu-visualizer-row.h"
|
# include "sp-cpu-visualizer-row.h"
|
||||||
# include "widgets/sp-failed-state-view.h"
|
# include "sp-failed-state-view.h"
|
||||||
# include "visualizers/sp-line-visualizer-row.h"
|
# include "sp-line-visualizer-row.h"
|
||||||
# include "widgets/sp-empty-state-view.h"
|
# include "sp-empty-state-view.h"
|
||||||
# include "util/sp-model-filter.h"
|
# include "sp-model-filter.h"
|
||||||
# include "widgets/sp-multi-paned.h"
|
# include "sp-multi-paned.h"
|
||||||
# include "widgets/sp-recording-state-view.h"
|
# include "sp-recording-state-view.h"
|
||||||
# include "util/sp-process-model.h"
|
# include "sp-process-model.h"
|
||||||
# include "util/sp-process-model-item.h"
|
# include "sp-process-model-item.h"
|
||||||
# include "widgets/sp-process-model-row.h"
|
# include "sp-process-model-row.h"
|
||||||
# include "widgets/sp-profiler-menu-button.h"
|
# include "sp-profiler-menu-button.h"
|
||||||
# include "visualizers/sp-visualizer-row.h"
|
# include "sp-visualizer-row.h"
|
||||||
# include "visualizers/sp-visualizer-view.h"
|
# include "sp-visualizer-view.h"
|
||||||
# include "util/sp-zoom-manager.h"
|
# include "sp-zoom-manager.h"
|
||||||
#undef SYSPROF_INSIDE
|
#undef SYSPROF_INSIDE
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
@ -35,10 +35,9 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "util/binfile.h"
|
#include "binfile.h"
|
||||||
#include "util/elfparser.h"
|
#include "elfparser.h"
|
||||||
|
#include "sp-symbol-dirs.h"
|
||||||
#include "symbols/sp-symbol-dirs.h"
|
|
||||||
|
|
||||||
struct bin_file_t
|
struct bin_file_t
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* demangle.h
|
/* demangle.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,8 +20,8 @@
|
|||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
#include "util/demangle.h"
|
#include "demangle.h"
|
||||||
#include "util/elfparser.h"
|
#include "elfparser.h"
|
||||||
|
|
||||||
typedef struct Section Section;
|
typedef struct Section Section;
|
||||||
|
|
||||||
97
src/libsysprof/meson.build
Normal file
97
src/libsysprof/meson.build
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
libsysprof_public_sources = [
|
||||||
|
'sp-callgraph-profile.c',
|
||||||
|
'sp-capture-gobject.c',
|
||||||
|
'sp-elf-symbol-resolver.c',
|
||||||
|
'sp-gjs-source.c',
|
||||||
|
'sp-hostinfo-source.c',
|
||||||
|
'sp-jitmap-symbol-resolver.c',
|
||||||
|
'sp-kernel-symbol.c',
|
||||||
|
'sp-kernel-symbol-resolver.c',
|
||||||
|
'sp-local-profiler.c',
|
||||||
|
'sp-map-lookaside.c',
|
||||||
|
'sp-memory-source.c',
|
||||||
|
'sp-perf-counter.c',
|
||||||
|
'sp-perf-source.c',
|
||||||
|
'sp-process-model.c',
|
||||||
|
'sp-process-model-item.c',
|
||||||
|
'sp-proc-source.c',
|
||||||
|
'sp-profile.c',
|
||||||
|
'sp-profiler.c',
|
||||||
|
'sp-selection.c',
|
||||||
|
'sp-source.c',
|
||||||
|
'sp-symbol-dirs.c',
|
||||||
|
'sp-symbol-resolver.c',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_public_headers = [
|
||||||
|
'sp-callgraph-profile.h',
|
||||||
|
'sp-callgraph-profile-private.h',
|
||||||
|
'sp-capture-gobject.h',
|
||||||
|
'sp-elf-symbol-resolver.h',
|
||||||
|
'sp-gjs-source.h',
|
||||||
|
'sp-hostinfo-source.h',
|
||||||
|
'sp-jitmap-symbol-resolver.h',
|
||||||
|
'sp-kernel-symbol.h',
|
||||||
|
'sp-kernel-symbol-resolver.h',
|
||||||
|
'sp-local-profiler.h',
|
||||||
|
'sp-map-lookaside.h',
|
||||||
|
'sp-memory-source.h',
|
||||||
|
'sp-perf-counter.h',
|
||||||
|
'sp-perf-source.h',
|
||||||
|
'sp-process-model.h',
|
||||||
|
'sp-process-model-item.h',
|
||||||
|
'sp-proc-source.h',
|
||||||
|
'sp-profile.h',
|
||||||
|
'sp-profiler.h',
|
||||||
|
'sp-selection.h',
|
||||||
|
'sp-source.h',
|
||||||
|
'sp-symbol-dirs.h',
|
||||||
|
'sp-symbol-resolver.h',
|
||||||
|
'sysprof.h',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_private_sources = [
|
||||||
|
'binfile.c',
|
||||||
|
'demangle.cpp',
|
||||||
|
'elfparser.c',
|
||||||
|
'stackstash.c',
|
||||||
|
'sp-source-util.c',
|
||||||
|
]
|
||||||
|
|
||||||
|
libsysprof_deps = [
|
||||||
|
cxx.find_library('stdc++'),
|
||||||
|
dependency('gio-2.0', version: glib_req_version),
|
||||||
|
dependency('gio-unix-2.0', version: glib_req_version),
|
||||||
|
libsysprof_capture_dep,
|
||||||
|
libshared_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
if get_option('with_sysprofd') != 'none'
|
||||||
|
libsysprof_deps += dependency('polkit-gobject-1')
|
||||||
|
endif
|
||||||
|
|
||||||
|
libsysprof = shared_library('sysprof-@0@'.format(libsysprof_api_version),
|
||||||
|
libsysprof_public_sources + libsysprof_private_sources,
|
||||||
|
dependencies: libsysprof_deps,
|
||||||
|
c_args: [ '-DSYSPROF_COMPILATION' ],
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('libdir'),
|
||||||
|
)
|
||||||
|
|
||||||
|
libsysprof_dep = declare_dependency(
|
||||||
|
link_with: libsysprof,
|
||||||
|
dependencies: libsysprof_deps,
|
||||||
|
include_directories: include_directories('.'),
|
||||||
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(
|
||||||
|
subdirs: [ sysprof_header_subdir ],
|
||||||
|
version: meson.project_version(),
|
||||||
|
name: 'sysprof-@0@'.format(libsysprof_api_version),
|
||||||
|
filebase: 'sysprof-@0@'.format(libsysprof_api_version),
|
||||||
|
description: 'The library for console applications embedding sysprof',
|
||||||
|
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||||
|
requires: [ 'gio-2.0' ],
|
||||||
|
)
|
||||||
|
|
||||||
|
install_headers(libsysprof_public_headers, subdir: sysprof_header_subdir)
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-callgraph-profile-private.h
|
/* sp-callgraph-profile-private.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Christian Hergert <christian@hergert.me>
|
* Copyright 2016 Christian Hergert <christian@hergert.me>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,8 +19,8 @@
|
|||||||
#ifndef SP_CALLGRAPH_PROFILE_PRIVATE_H
|
#ifndef SP_CALLGRAPH_PROFILE_PRIVATE_H
|
||||||
#define SP_CALLGRAPH_PROFILE_PRIVATE_H
|
#define SP_CALLGRAPH_PROFILE_PRIVATE_H
|
||||||
|
|
||||||
#include "callgraph/sp-callgraph-profile.h"
|
#include "sp-callgraph-profile.h"
|
||||||
#include "util/stackstash.h"
|
#include "stackstash.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-callgraph-profile.c
|
/* sp-callgraph-profile.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Christian Hergert <christian@hergert.me>
|
* Copyright 2016 Christian Hergert <christian@hergert.me>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -36,19 +36,18 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sysprof-capture.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sp-address.h"
|
#include "sp-callgraph-profile.h"
|
||||||
#include "callgraph/sp-callgraph-profile.h"
|
#include "sp-callgraph-profile-private.h"
|
||||||
#include "callgraph/sp-callgraph-profile-private.h"
|
#include "sp-capture-reader.h"
|
||||||
#include "capture/sp-capture-reader.h"
|
#include "sp-elf-symbol-resolver.h"
|
||||||
#include "symbols/sp-elf-symbol-resolver.h"
|
#include "sp-jitmap-symbol-resolver.h"
|
||||||
#include "symbols/sp-jitmap-symbol-resolver.h"
|
#include "sp-map-lookaside.h"
|
||||||
#include "util/sp-map-lookaside.h"
|
#include "sp-kernel-symbol-resolver.h"
|
||||||
#include "symbols/sp-kernel-symbol-resolver.h"
|
#include "sp-selection.h"
|
||||||
#include "util/sp-selection.h"
|
#include "stackstash.h"
|
||||||
|
|
||||||
#include "util/stackstash.h"
|
|
||||||
|
|
||||||
#define CHECK_CANCELLABLE_INTERVAL 100
|
#define CHECK_CANCELLABLE_INTERVAL 100
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-callgraph-profile.h
|
/* sp-callgraph-profile.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Christian Hergert <christian@hergert.me>
|
* Copyright 2016 Christian Hergert <christian@hergert.me>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,8 +19,8 @@
|
|||||||
#ifndef SP_CALLGRAPH_PROFILE_H
|
#ifndef SP_CALLGRAPH_PROFILE_H
|
||||||
#define SP_CALLGRAPH_PROFILE_H
|
#define SP_CALLGRAPH_PROFILE_H
|
||||||
|
|
||||||
#include "profiler/sp-profile.h"
|
#include "sp-profile.h"
|
||||||
#include "util/sp-selection.h"
|
#include "sp-selection.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
25
src/libsysprof/sp-capture-gobject.c
Normal file
25
src/libsysprof/sp-capture-gobject.c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/* sp-capture-gobject.c
|
||||||
|
*
|
||||||
|
* Copyright 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
|
||||||
|
* 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/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "sp-capture-gobject.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)
|
||||||
36
src/libsysprof/sp-capture-gobject.h
Normal file
36
src/libsysprof/sp-capture-gobject.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/* sp-capture-gobject.h
|
||||||
|
*
|
||||||
|
* Copyright 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
|
||||||
|
* 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/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
#include <sysprof-capture.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define SP_TYPE_CAPTURE_READER (sp_capture_reader_get_type())
|
||||||
|
#define SP_TYPE_CAPTURE_WRITER (sp_capture_writer_get_type())
|
||||||
|
#define SP_TYPE_CAPTURE_CURSOR (sp_capture_cursor_get_type())
|
||||||
|
|
||||||
|
GType sp_capture_reader_get_type (void);
|
||||||
|
GType sp_capture_writer_get_type (void);
|
||||||
|
GType sp_capture_cursor_get_type (void);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/* sp-elf-symbol-resolver.c
|
/* sp-elf-symbol-resolver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Christian Hergert <chergert@redhat.com>
|
* Copyright 2016 Christian Hergert <chergert@redhat.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "symbols/sp-elf-symbol-resolver.h"
|
#include "sp-elf-symbol-resolver.h"
|
||||||
#include "util/binfile.h"
|
#include "binfile.h"
|
||||||
#include "util/elfparser.h"
|
#include "elfparser.h"
|
||||||
#include "util/sp-map-lookaside.h"
|
#include "sp-map-lookaside.h"
|
||||||
|
|
||||||
struct _SpElfSymbolResolver
|
struct _SpElfSymbolResolver
|
||||||
{
|
{
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user