mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 22:50:54 +00:00
Better handling of events without stacktraces
This commit is contained in:
2
TODO
2
TODO
@ -23,6 +23,8 @@ Before 1.0.4:
|
|||||||
|
|
||||||
Before 1.2:
|
Before 1.2:
|
||||||
|
|
||||||
|
* Hack around gtk+ bug where it mispositions the window.
|
||||||
|
|
||||||
* Counters must not be destroyed during tracker setup. They have to exist
|
* Counters must not be destroyed during tracker setup. They have to exist
|
||||||
but be disabled so that we can track creation of processes.
|
but be disabled so that we can track creation of processes.
|
||||||
|
|
||||||
|
|||||||
22
collector.c
22
collector.c
@ -473,10 +473,28 @@ process_sample (Collector *collector,
|
|||||||
{
|
{
|
||||||
uint64_t *ips;
|
uint64_t *ips;
|
||||||
int n_ips;
|
int n_ips;
|
||||||
|
|
||||||
if (sample->n_ips == 0)
|
if (sample->n_ips == 0)
|
||||||
{
|
{
|
||||||
ips = &sample->ip;
|
uint64_t trace[3];
|
||||||
n_ips = 1;
|
|
||||||
|
if (sample->header.misc & PERF_EVENT_MISC_KERNEL)
|
||||||
|
{
|
||||||
|
trace[0] = PERF_CONTEXT_KERNEL;
|
||||||
|
trace[1] = sample->ip;
|
||||||
|
trace[2] = PERF_CONTEXT_USER;
|
||||||
|
|
||||||
|
ips = trace;
|
||||||
|
n_ips = 3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
trace[0] = PERF_CONTEXT_USER;
|
||||||
|
trace[1] = sample->ip;
|
||||||
|
|
||||||
|
ips = trace;
|
||||||
|
n_ips = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -295,8 +295,6 @@ tracker_add_process (tracker_t * tracker,
|
|||||||
COPY_STRING (event.command_line, command_line);
|
COPY_STRING (event.command_line, command_line);
|
||||||
|
|
||||||
tracker_append (tracker, &event, sizeof (event));
|
tracker_append (tracker, &event, sizeof (event));
|
||||||
|
|
||||||
g_print ("Added new process: %d (%s)\n", pid, command_line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user