util/perf: C++-proof util/perf
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Wed, 8 Mar 2023 13:49:08 +0000 (14:49 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 24 Mar 2023 15:49:25 +0000 (15:49 +0000)
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>

src/util/perf/cpu_trace.h
src/util/perf/u_trace_priv.h

index c13a382..bca056a 100644 (file)
@@ -77,7 +77,7 @@ static inline void
 _mesa_trace_scope_end(int *scope)
 {
    /* we save the category in the scope variable */
-   _MESA_TRACE_END(*scope);
+   _MESA_TRACE_END((enum util_perfetto_category) *scope);
 }
 
 #else
index 9804fa3..25dc07c 100644 (file)
  * Internal interface used by generated tracepoints
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Tracepoint descriptor.
  */
@@ -71,6 +75,8 @@ u_trace_append(struct u_trace *ut, void *cs, const struct u_tracepoint *tp)
    return u_trace_appendv(ut, cs, tp, 0);
 }
 
-
+#ifdef __cplusplus
+}
+#endif
 
 #endif  /* _U_TRACE_PRIV_H */