dom0+vm/dispvm: add some timing logs
This commit is contained in:
		
							parent
							
								
									a9bd7120c4
								
							
						
					
					
						commit
						f6c65c2a83
					
				@ -8,6 +8,16 @@
 | 
				
			|||||||
#include <ioall.h>
 | 
					#include <ioall.h>
 | 
				
			||||||
#include "dvm2.h"
 | 
					#include "dvm2.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					char *gettime()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						static char retbuf[60];
 | 
				
			||||||
 | 
						struct timeval tv;
 | 
				
			||||||
 | 
						gettimeofday(&tv, NULL);
 | 
				
			||||||
 | 
						snprintf(retbuf, sizeof(retbuf), "%lld.%lld",
 | 
				
			||||||
 | 
							 (long long) tv.tv_sec, (long long) tv.tv_usec);
 | 
				
			||||||
 | 
						return retbuf;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
char *get_filename()
 | 
					char *get_filename()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char buf[DVM_FILENAME_SIZE];
 | 
						char buf[DVM_FILENAME_SIZE];
 | 
				
			||||||
@ -67,6 +77,7 @@ main()
 | 
				
			|||||||
		perror("stat pre");
 | 
							perror("stat pre");
 | 
				
			||||||
		exit(1);
 | 
							exit(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						fprintf(stderr, "time=%s, waiting for qubes-session\n", gettime());
 | 
				
			||||||
	// wait for X server to starts (especially in DispVM)
 | 
						// wait for X server to starts (especially in DispVM)
 | 
				
			||||||
	if (stat("/tmp/qubes-session-env", &session_stat)) {
 | 
						if (stat("/tmp/qubes-session-env", &session_stat)) {
 | 
				
			||||||
		switch (child = fork()) {
 | 
							switch (child = fork()) {
 | 
				
			||||||
@ -95,6 +106,7 @@ main()
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						fprintf(stderr, "time=%s, starting editor\n", gettime());
 | 
				
			||||||
	switch (child = fork()) {
 | 
						switch (child = fork()) {
 | 
				
			||||||
		case -1:
 | 
							case -1:
 | 
				
			||||||
			perror("fork");
 | 
								perror("fork");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user