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