mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: rename follow_fork() to follow_process()
This is more of what we want to be doing anyway, we don't care about all the forks in existence. Additionally, include the comm[] with the pid so that instruments can take action based on it.
This commit is contained in:
@ -126,13 +126,14 @@ _sysprof_instrument_augment (SysprofInstrument *self,
|
||||
static DexFuture *
|
||||
_sysprof_instrument_process_started (SysprofInstrument *self,
|
||||
SysprofRecording *recording,
|
||||
int pid)
|
||||
int pid,
|
||||
const char *comm)
|
||||
{
|
||||
g_assert (SYSPROF_IS_INSTRUMENT (self));
|
||||
g_assert (SYSPROF_IS_RECORDING (recording));
|
||||
|
||||
if (SYSPROF_INSTRUMENT_GET_CLASS (self)->process_started)
|
||||
return SYSPROF_INSTRUMENT_GET_CLASS (self)->process_started (self, recording, pid);
|
||||
return SYSPROF_INSTRUMENT_GET_CLASS (self)->process_started (self, recording, pid, comm);
|
||||
|
||||
return dex_future_new_for_boolean (TRUE);
|
||||
}
|
||||
@ -288,7 +289,8 @@ _sysprof_instruments_augment (GPtrArray *instruments,
|
||||
DexFuture *
|
||||
_sysprof_instruments_process_started (GPtrArray *instruments,
|
||||
SysprofRecording *recording,
|
||||
int pid)
|
||||
int pid,
|
||||
const char *comm)
|
||||
{
|
||||
g_autoptr(GPtrArray) futures = NULL;
|
||||
|
||||
@ -301,7 +303,7 @@ _sysprof_instruments_process_started (GPtrArray *instruments,
|
||||
{
|
||||
SysprofInstrument *instrument = g_ptr_array_index (instruments, i);
|
||||
|
||||
g_ptr_array_add (futures, _sysprof_instrument_process_started (instrument, recording, pid));
|
||||
g_ptr_array_add (futures, _sysprof_instrument_process_started (instrument, recording, pid, comm));
|
||||
}
|
||||
|
||||
if (futures->len == 0)
|
||||
|
||||
Reference in New Issue
Block a user