[PATCH] D93117: LNT: Fix Perf profiling support

Tamar Christina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 09:03:10 PST 2020


tnfchris updated this revision to Diff 311245.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93117/new/

https://reviews.llvm.org/D93117

Files:
  lnt/testing/profile/cPerf.cpp
  lnt/testing/profile/perf.py


Index: lnt/testing/profile/perf.py
===================================================================
--- lnt/testing/profile/perf.py
+++ lnt/testing/profile/perf.py
@@ -7,7 +7,7 @@
 import traceback
 
 try:
-    import cPerf
+    from . import cPerf
 except Exception:
     pass
 
Index: lnt/testing/profile/cPerf.cpp
===================================================================
--- lnt/testing/profile/cPerf.cpp
+++ lnt/testing/profile/cPerf.cpp
@@ -824,13 +824,15 @@
                                      nullptr};
 #endif
 
-PyMODINIT_FUNC initcPerf(void) {
 #if PY_MAJOR_VERSION >= 3
+PyMODINIT_FUNC PyInit_cPerf(void) {
   return PyModule_Create(&cPerfModuleDef);
+}
 #else
+PyMODINIT_FUNC initcPerf(void) {
   (void)Py_InitModule("cPerf", cPerfMethods);
-#endif
 }
+#endif
 
 #else // STANDALONE
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93117.311245.patch
Type: text/x-patch
Size: 813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201211/9f83a2e1/attachment.bin>


More information about the llvm-commits mailing list