From cfa5fd724ba440ff95aa7a1223a383754b599edd Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Mon, 26 Jun 2023 09:38:12 +0800 Subject: [PATCH] =?UTF-8?q?biotop=20probe:=20define=20the=20struct=20disk?= =?UTF-8?q?=20and=20vector=E3=80=81enum=20sort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- observation/src/biotop/biotop.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 observation/src/biotop/biotop.c diff --git a/observation/src/biotop/biotop.c b/observation/src/biotop/biotop.c new file mode 100644 index 00000000..2ed52f83 --- /dev/null +++ b/observation/src/biotop/biotop.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) + +#include "commons.h" +#include "biotop.h" +#include "biotop.skel.h" +#include "trace_helpers.h" +#include "compat.h" + +#define OUTPUT_ROWS_LIMIT 10240 + +enum SORT { + ALL, + IO, + BYTES, + TIME, +}; + +struct disk { + int major; + int minor; + char name[256]; +}; + +struct vector { + size_t nr; + size_t capacity; + void **elems; +}; + -- Gitee