Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: ktop.h

Issue 6893111: Enhancements to ktop (Closed) Base URL: ssh://gitrw.chromium.org:9222/ktop.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gnu.mk ('k') | main.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ktop.h
diff --git a/ktop.h b/ktop.h
index dd77b3e44917019dcfd749d3b1ab51aa509c8081..c07f93d62f618397b76671f9e30aa90d60c9d114 100644
--- a/ktop.h
+++ b/ktop.h
@@ -3,8 +3,8 @@
* Distributed under the terms of the GNU General Public License v2
*/
-#ifndef _KTOP_H
-#define _KTOP_H 1
+#ifndef _KTOP_H_
+#define _KTOP_H_ 1
#ifndef _STYLE_H_
#include <style.h>
@@ -15,10 +15,11 @@
#endif
enum { MAX_PID = 1 << 15,
- MAX_PIDCALLS = 1 << 13,
+ MAX_PIDCALLS = 1 << 10,
MAX_NAME = 1 << 12,
SYSCALL_SHIFT = 9,
- SYSCALL_MASK = (1 << SYSCALL_SHIFT) - 1 };
+ SYSCALL_MASK = (1 << SYSCALL_SHIFT) - 1,
+ NUM_ARGS = 6 };
CHECK_CONST((1 << SYSCALL_SHIFT) >= NUM_SYS_CALLS);
@@ -37,34 +38,61 @@ static inline u32 get_call(u32 pidcall)
return pidcall & SYSCALL_MASK;
}
-typedef struct Pidcall_s {
+typedef void (*display_fn)(void);
+
+typedef struct Pidcall_s Pidcall_s;
+struct Pidcall_s {
+ Pidcall_s *next;
u32 pidcall;
u32 count;
-} Pidcall_s;
-
-typedef struct Collector_args_s {
- int cpu_id;
-} Collector_args_s;
+ unint clock;
+ struct {
+ u64 start;
+ u64 total;
+ } time;
+ struct {
+ u32 count;
+ u64 time;
+ } save;
+ unint arg[NUM_ARGS];
+ char *name;
+};
extern bool Dump; /* Dump of ftrace logs - don't start display */
extern bool Trace_exit; /* Trace sys_exit events */
extern bool Trace_self; /* Trace myself and ignore others */
+extern display_fn Display;
+void internal_display(void);
+void kernel_display(void);
+void file_system_display(void);
+
extern u64 Syscall_count[NUM_SYS_CALLS];
extern int Pid[MAX_PID];
extern Pidcall_s Pidcall[MAX_PIDCALLS];
-extern Pidcall_s *Pidnext;
+extern u64 PidcallRecord;
+extern u64 PidcallIterations;
+extern u64 Pidcall_tick;
+
+extern u64 No_enter;
+extern u64 Found;
+extern u64 Out_of_order;
+extern u64 No_start;
extern u64 MyPidCount;
extern u64 Slept;
-extern int Command;
+extern bool Halt;
void cleanup(int sig);
void cleanup_collector(void);
void start_collector(void);
-void *display(void *arg);
+void *reduce(void *arg);
+void decrease_reduce_interval(void);
+void increase_reduce_interval(void);
+void reset_reduce(void);
+
void cleanup_display(void);
void clear_display(void);
« no previous file with comments | « gnu.mk ('k') | main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698