This file is indexed.

/usr/include/sysprof-2/sources/sp-source.h is in sysprof 3.28.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* sp-source.h
 *
 * Copyright (C) 2016 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/>.
 */

#ifndef SP_SOURCE_H
#define SP_SOURCE_H

#include <glib-object.h>

#include "capture/sp-capture-writer.h"

G_BEGIN_DECLS

#define SP_TYPE_SOURCE (sp_source_get_type())

G_DECLARE_INTERFACE (SpSource, sp_source, SP, SOURCE, GObject)

struct _SpSourceInterface
{
  GTypeInterface parent_iface;

  /**
   * SpSource::get_is_ready:
   * @self: A SpSource.
   *
   * This function should return %TRUE if the source is ready to start
   * profiling. If the source is not ready until after sp_source_start() has
   * been called, use sp_source_emit_ready() to notify the profiler that the
   * source is ready for profiling.
   *
   * Returns: %TRUE if the source is ready to start profiling.
   */
  gboolean (*get_is_ready) (SpSource *self);

  /**
   * SpSource::set_writer:
   * @self: A #SpSource.
   * @writer: A #SpCaptureWriter
   *
   * Sets the #SpCaptureWriter to use when profiling. @writer is only safe to
   * use from the main thread. If you need to capture from a thread, you should
   * create a memory-based #SpCaptureWriter and then splice that into this
   * writer from the main thread when profiling completes.
   *
   * See sp_capture_writer_splice() for information on splicing writers.
   */
  void (*set_writer) (SpSource        *self,
                      SpCaptureWriter *writer);

  /**
   * SpSource::prepare:
   *
   * This function is called before profiling has started. The source should
   * prepare any pre-profiling setup here. It may perform this work
   * asynchronously, but must g_object_notify() the SpSource::is-ready
   * property once that asynchronous work has been performed. Until it
   * is ready, #SpSource::is-ready must return FALSE.
   */
  void (*prepare) (SpSource *self);

  /**
   * SpSource::add_pid:
   * @self: A #SpSource
   * @pid: A pid_t > -1
   *
   * This function is used to notify the #SpSource that a new process,
   * identified by @pid, should be profiled. By default, sources should
   * assume all processes, and only restrict to a given set of pids if
   * this function is called.
   */
  void (*add_pid) (SpSource *self,
                   GPid      pid);

  /**
   * SpSource::start:
   * @self: A #SpSource.
   *
   * Start profiling as configured.
   *
   * If a failure occurs while processing, the source should notify the
   * profiling session via sp_source_emit_failed() from the main thread.
   */
  void (*start) (SpSource *self);

  /**
   * SpSource::stop:
   * @self: A #SpSource.
   *
   * Stop capturing a profile. The source should immediately stop
   * profiling and perform any cleanup tasks required. If doing
   * off-main-thread capturing, this is a good time to splice your
   * capture into the capture file set with sp_source_set_writer().
   *
   * If you need to perform asynchronous cleanup, call
   * sp_source_emit_finished() once that work has completed. If you do
   * not need to perform asynchronous cleanup, call
   * sp_source_emit_finished() from this function.
   *
   * sp_source_emit_finished() must be called from the main-thread.
   */
  void (*stop) (SpSource *self);
};

void     sp_source_add_pid       (SpSource        *self,
                                  GPid             pid);
void     sp_source_emit_ready    (SpSource        *self);
void     sp_source_emit_finished (SpSource        *self);
void     sp_source_emit_failed   (SpSource        *self,
                                  const GError    *error);
gboolean sp_source_get_is_ready  (SpSource        *self);
void     sp_source_prepare       (SpSource        *self);
void     sp_source_set_writer    (SpSource        *self,
                                  SpCaptureWriter *writer);
void     sp_source_start         (SpSource        *self);
void     sp_source_stop          (SpSource        *self);

G_END_DECLS

#endif /* SP_SOURCE_H */