Module Name:    src
Committed By:   joerg
Date:           Sat Jul 27 23:43:19 UTC 2019

Modified Files:
        src/external/bsd/jemalloc/dist/include/jemalloc/internal:
            arena_inlines_a.h
        src/external/bsd/jemalloc/include/jemalloc/internal: arena_inlines_a.h

Log Message:
Ensure that percpu_arena_update is really dead if it shouldn't work and
really alive otherwise.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h
diff -u src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h:1.2 src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h:1.3
--- src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h:1.2	Thu Mar 14 18:59:37 2019
+++ src/external/bsd/jemalloc/dist/include/jemalloc/internal/arena_inlines_a.h	Sat Jul 27 23:43:18 2019
@@ -32,9 +32,10 @@ arena_prof_accum(tsdn_t *tsdn, arena_t *
 	return prof_accum_add(tsdn, &arena->prof_accum, accumbytes);
 }
 
-static JEMALLOC_NORETURN inline void
+#ifdef JEMALLOC_PERCPU_ARENA
+static
+inline void
 percpu_arena_update(tsd_t *tsd, unsigned cpu) {
-	assert(have_percpu_arena);
 	arena_t *oldarena = tsd_arena_get(tsd);
 	assert(oldarena != NULL);
 	unsigned oldind = arena_ind_get(oldarena);
@@ -53,5 +54,11 @@ percpu_arena_update(tsd_t *tsd, unsigned
 		}
 	}
 }
+#else
+static JEMALLOC_NORETURN inline void
+percpu_arena_update(tsd_t *tsd, unsigned cpu) {
+	abort();
+}
+#endif
 
 #endif /* JEMALLOC_INTERNAL_ARENA_INLINES_A_H */

Index: src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h:1.2 src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h:1.3
--- src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h:1.2	Sun Mar 10 19:32:56 2019
+++ src/external/bsd/jemalloc/include/jemalloc/internal/arena_inlines_a.h	Sat Jul 27 23:43:19 2019
@@ -32,9 +32,10 @@ arena_prof_accum(tsdn_t *tsdn, arena_t *
 	return prof_accum_add(tsdn, &arena->prof_accum, accumbytes);
 }
 
-static JEMALLOC_NORETURN inline void
+#ifdef JEMALLOC_PERCPU_ARENA
+static
+inline void
 percpu_arena_update(tsd_t *tsd, unsigned cpu) {
-	assert(have_percpu_arena);
 	arena_t *oldarena = tsd_arena_get(tsd);
 	assert(oldarena != NULL);
 	unsigned oldind = arena_ind_get(oldarena);
@@ -53,5 +54,11 @@ percpu_arena_update(tsd_t *tsd, unsigned
 		}
 	}
 }
+#else
+static JEMALLOC_NORETURN inline void
+percpu_arena_update(tsd_t *tsd, unsigned cpu) {
+	abort();
+}
+#endif
 
 #endif /* JEMALLOC_INTERNAL_ARENA_INLINES_A_H */

Reply via email to