Closed om26er closed 11 months ago
‘PyCodeObject’ {aka ‘struct PyCodeObject’} has no member named ‘co_lnotab’
looks like one of the endless issues resulting from the lack of / changing nature of a stable Python ABI :(
it might be as simple as using co_lines()
instead. The function is new to python 3.10.
Moving to cibuildwheel #241 would make releasing a new version less painful. Help welcome.
We would like to push a new release of Crossbar.io, and this is the only issue we are left
https://github.com/crossbario/crossbar/pull/1917#issuecomment-977820091
I would like to avoid removing vmprof (making it optional or what ..) ... is there any chance for a new vmprof release now?
@mattip ok, rgd #241 .. I see. "Help welcome": understood. oh well, would be some rich guys would shelf out more bucks and hands for proper OSS maintenance.
I think I might have time to look at it later this week
I have the same issue on Python3.8
at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input_)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):
Issue persists on Ubuntu 22. This is my first attempt at using vmprof; I'm wondering if I'm looking at the wrong tool? All I'd like to do is look at the assembly code pypy3 outputs.
Hi Godmar. Vmprof is not the right way to look at the assembly code - PYPYLOG is.
Thank you for the reply. What exactly is PYPYLOG
?
I already used the PYPYLOG
environment variable to obtain a logfile that has CODE_DUMP
entries. I would like to see them in standard assembly format and was hoping for a tool to pretty print or format the content of the file that was produced when running pypy3
with PYPYLOG=...
set.
Could you provide a URL? The only thing I found, beside jitviewer.py
that's apparently part of vmprof
, was pypy_traceviewer which I'll try next. I had hoped for a command-line based tool.
PS: pypy_traceviewer
seems to require Python 3.5 - it doesn't seem to work with 3.6 or later.
Hi Godmar. Any chance you can join IRC, so we don't have to do it over github issues? There is a bunch of a bit half-assed tools, I personally use jitviewer, but it's not like it's finished.
I appreciate the offer, but the reason I post here is to help others who may be in the same situation. I also don't use IRC regularly, and wouldn't I need to know a channel name, anyway?
rgd IRC, yes, it's channel "#pypy" ..
Well, the problem is that you have a lot of half-working tools (or tools that require some knowledge) that I can explain, but it'll be hard to explain in a non-interactive way. If you want to come up with a documentation out of that, you are more than welcome, but I'm not willing to write full doc on a github issue.
cpy 3.11 build fails with
building '_vmprof' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/src
creating build/temp.linux-x86_64-cpython-311/src/libbacktrace
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.11 -c src/_vmprof.c -o build/temp.linux-x86_64-cpython-311/src/_vmprof.o -Wno-unused -DVMPROF_LINUX=1 -DVMPROF_UNIX=1 "-I src/" "-I src/libbacktrace"
src/_vmprof.c: In function ‘sample_stack_now’:
src/_vmprof.c:301:53: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
301 | entry_count = vmp_walk_and_record_stack(tstate->frame, m, SINGLE_BUF_SIZE/sizeof(void*)-1, (int)skip, 0);
| ^~~~~
| cframe
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for vmprof
Running setup.py clean for vmprof
Failed to build vmprof
@oberstet See #251.
@oberstet See #251.
thanks! fwiw, it makes me feel sad, Python will probably live forever with the consequences of an undefined run-time API (CPyExt). also with the consequences of "broken" dependency management (setuptools/pip). I've again spent hours for the latest crossbar release fiddling with Ethereum Python libraries. well. some things will hunt you, there is no escape;) anyways.
Version 0.4.17 is now on PyPI with wheels for most x86_64 platforms, including python3.11
great news. this is fantastic! thank you for your work - and for vmprof in the first place=)
The currently released version cannot be install from pypi when using python 3.10. However installation from master branch is possible. Please upload a new release. Below is the log I see when installing frmom pypi