Browse Source

Use __gcov_dump instead of __gcov_flush to dump profile information

__gcov_flush is essentially __gcov_dump followed by __gcov_reset.
The way we use __gcov_flush so far does not need any __gcov_reset,
so use __gcov_dump instead.

* defs.h [ENABLE_COVERAGE_GCOV] (__gcov_flush): Replace with
__gcov_dump.
(GCOV_FLUSH): Replace with GCOV_DUMP.
* filter_seccomp.c (check_seccomp_order_do_child): Replace GCOV_FLUSH
with GCOV_DUMP.
* strace.c (terminate): Likewise.
Dmitry V. Levin 1 month ago
parent
commit
f22e8d58ac
3 changed files with 6 additions and 6 deletions
  1. 3
    3
      defs.h
  2. 1
    1
      filter_seccomp.c
  3. 2
    2
      strace.c

+ 3
- 3
defs.h View File

@@ -1469,10 +1469,10 @@ extern const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES];
1469 1469
 extern struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES];
1470 1470
 
1471 1471
 # ifdef ENABLE_COVERAGE_GCOV
1472
-extern void __gcov_flush(void);
1473
-#  define GCOV_FLUSH __gcov_flush()
1472
+extern void __gcov_dump(void);
1473
+#  define GCOV_DUMP __gcov_dump()
1474 1474
 # else
1475
-#  define GCOV_FLUSH
1475
+#  define GCOV_DUMP
1476 1476
 # endif
1477 1477
 
1478 1478
 # ifdef IN_MPERS_BOOTSTRAP

+ 1
- 1
filter_seccomp.c View File

@@ -120,7 +120,7 @@ check_seccomp_order_do_child(void)
120 120
 		perror_func_msg_and_die("PTRACE_TRACEME");
121 121
 	}
122 122
 
123
-	GCOV_FLUSH;
123
+	GCOV_DUMP;
124 124
 
125 125
 	kill(pid, SIGSTOP);
126 126
 	syscall(__NR_gettid);

+ 2
- 2
strace.c View File

@@ -3022,14 +3022,14 @@ terminate(void)
3022 3022
 		/* Child was killed by a signal, mimic that.  */
3023 3023
 		exit_code &= 0xff;
3024 3024
 		signal(exit_code, SIG_DFL);
3025
-		GCOV_FLUSH;
3025
+		GCOV_DUMP;
3026 3026
 		raise(exit_code);
3027 3027
 
3028 3028
 		/* Unblock the signal.  */
3029 3029
 		sigset_t mask;
3030 3030
 		sigemptyset(&mask);
3031 3031
 		sigaddset(&mask, exit_code);
3032
-		GCOV_FLUSH;
3032
+		GCOV_DUMP;
3033 3033
 		sigprocmask(SIG_UNBLOCK, &mask, NULL);
3034 3034
 
3035 3035
 		/* Paranoia - what if this signal is not fatal?

Loading…
Cancel
Save