mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
sysprof-cli: bump default buffer size to 8mb
The goal here is just to reduce the number of file system transactions during the recording process.
This commit is contained in:
@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
#include "sysprof-capture-util-private.h"
|
#include "sysprof-capture-util-private.h"
|
||||||
|
|
||||||
|
#define DEFAULT_BUFFER_SIZE (1024L * 1024L * 8L /* 8mb */)
|
||||||
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofCaptureReader, sysprof_capture_reader_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofCaptureReader, sysprof_capture_reader_unref)
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofCaptureWriter, sysprof_capture_writer_unref)
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofCaptureWriter, sysprof_capture_writer_unref)
|
||||||
|
|
||||||
@ -298,7 +300,7 @@ main (int argc,
|
|||||||
int pid = -1;
|
int pid = -1;
|
||||||
int fd;
|
int fd;
|
||||||
int flags;
|
int flags;
|
||||||
int n_buffer_pages = 0;
|
int n_buffer_pages = (DEFAULT_BUFFER_SIZE / sysprof_getpagesize ());
|
||||||
GOptionEntry entries[] = {
|
GOptionEntry entries[] = {
|
||||||
{ "no-throttle", 0, 0, G_OPTION_ARG_NONE, &no_throttle, N_("Disable CPU throttling while profiling [Deprecated for --power-profile]") },
|
{ "no-throttle", 0, 0, G_OPTION_ARG_NONE, &no_throttle, N_("Disable CPU throttling while profiling [Deprecated for --power-profile]") },
|
||||||
{ "pid", 'p', 0, G_OPTION_ARG_INT, &pid, N_("Make sysprof specific to a task [Deprecated]"), N_("PID") },
|
{ "pid", 'p', 0, G_OPTION_ARG_INT, &pid, N_("Make sysprof specific to a task [Deprecated]"), N_("PID") },
|
||||||
|
|||||||
Reference in New Issue
Block a user