mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 15:10:53 +00:00
libsysprof: use gtk_tim_sort() for kernel kallsyms array
This commit is contained in:
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "timsort/gtktimsortprivate.h"
|
||||||
|
|
||||||
#include "rust-demangle.h"
|
#include "rust-demangle.h"
|
||||||
|
|
||||||
#include "sysprof-kallsyms-symbolizer.h"
|
#include "sysprof-kallsyms-symbolizer.h"
|
||||||
@ -174,7 +176,11 @@ sysprof_kallsyms_symbolizer_prepare_worker (GTask *task,
|
|||||||
/* We cannot rely on sorting of kallsyms up-front from Linux in all
|
/* We cannot rely on sorting of kallsyms up-front from Linux in all
|
||||||
* cases so we must sort the resulting array now.
|
* cases so we must sort the resulting array now.
|
||||||
*/
|
*/
|
||||||
g_array_sort (self->kallsyms, sort_by_address);
|
gtk_tim_sort (self->kallsyms->data,
|
||||||
|
self->kallsyms->len,
|
||||||
|
sizeof (KernelSymbol),
|
||||||
|
(GCompareDataFunc)sort_by_address,
|
||||||
|
NULL);
|
||||||
|
|
||||||
/* Store a "best guess" at an lower/upper bound for the max address so that
|
/* Store a "best guess" at an lower/upper bound for the max address so that
|
||||||
* we can avoid searching for anything unreasonably past the end of the last
|
* we can avoid searching for anything unreasonably past the end of the last
|
||||||
|
|||||||
Reference in New Issue
Block a user