mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-03-24 22:21:27 +00:00
whitespace cleanup
This commit is contained in:
@ -56,13 +56,15 @@
|
||||
#define N_WAKEUP_EVENTS 149
|
||||
|
||||
/* Identifiers for the various tracepoints we might watch for */
|
||||
enum SysprofTracepoint {
|
||||
enum SysprofTracepoint
|
||||
{
|
||||
DRM_VBLANK,
|
||||
DRM_I915_BEGIN,
|
||||
DRM_I915_END,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
enum SysprofTracepoint tp;
|
||||
const char *path;
|
||||
const char **fields;
|
||||
@ -412,27 +414,18 @@ sysprof_perf_source_handle_event (SysprofPerfCounterEvent *event,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
sysprof_perf_get_tracepoint_config (const char *path, gint64 *config)
|
||||
sysprof_perf_get_tracepoint_config (const char *path,
|
||||
gint64 *config)
|
||||
{
|
||||
gchar *filename = NULL;
|
||||
gchar *contents;
|
||||
size_t len;
|
||||
g_autofree gchar *filename = NULL;
|
||||
g_autofree gchar *contents = NULL;
|
||||
gsize len;
|
||||
|
||||
filename = g_strdup_printf ("/sys/kernel/debug/tracing/events/%s/id", path);
|
||||
if (!filename)
|
||||
return FALSE;
|
||||
|
||||
if (!g_file_get_contents (filename, &contents, &len, NULL))
|
||||
{
|
||||
g_free (filename);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_free(filename);
|
||||
|
||||
*config = strtoull (contents, NULL, 0);
|
||||
|
||||
g_free (contents);
|
||||
*config = g_ascii_strtoull (contents, NULL, 10);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user