Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
parttimenerd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
parttimenerd
3y ago
I wrote a small profiler in ~240 lines of pure Java code: https://github.com/parttimenerd/tiny-profiler It is reasonable fast :)
32.
▲
Let's create a Python Debugger together
(mostlynerdless.de)
103 points
by
parttimenerd
3y ago
|
10 comments
33.
▲
by
parttimenerd
3y ago
4-part series on writing a Python debugger from scratch, using old and new APIs.
34.
▲
by
parttimenerd
3y ago
It's an interesting new API. I hope to write a blog post on implementing a debugger with it soon.
35.
▲
by
parttimenerd
3y ago
I've done something similar in Python: A Python debugger from scratch in Python - https://github.com/parttimenerd/python-dbg/ - Part 1: https://mostlynerdless.de/blog/2023/09/20
36.
▲
by
parttimenerd
4y ago
Thank you. I fixed the code in the GitHub repository but kept the code on my blog the same, with a disclaimer regarding its problems.
37.
▲
by
parttimenerd
4y ago
I would rather use Andrei Pangin's async-profiler than doing something custom with jstack.
38.
▲
by
parttimenerd
4y ago
Thanks, I implemented it using a boolean flag.
39.
▲
by
parttimenerd
4y ago
Thanks. But this should only be a problem if the JVM terminates too fast, or am I wrong?
40.
▲
by
parttimenerd
4y ago
(Author here) I want to quote from my article: "Writing a Java profiler in 240 lines of pure Java is possible and the resulting profiler could even be used to analyze performance problems. This profiler is not designed to replace real
41.
▲
by
parttimenerd
4y ago
It's not as significant as one might think (the JVM uses it internally for GC and other things). The main problem is the bias it leads to in profiling and that the time-to-safepoint can sporadically be in the tens of milliseconds with
42.
▲
by
parttimenerd
4y ago
> Such a task is usually thankless work so, thank you. :) It's just a game of whack-a-mole, finding new segmentation faults and other bugs is quite easy when you know how to write good test code. Fixing the actual bugs less so. But
43.
▲
by
parttimenerd
4y ago
(Author here) This blog post is actually part of a series to write profilers from scratch ( https://mostlynerdless.de/blog/tag/writing-a-profiler-from-s... ) and I'm looking forward to writing the next installm
44.
▲
by
parttimenerd
4y ago
The number of profiler writers is not too large (if you ignore all the people writing the UIs), but it's the same with compilers: You only need a few to create a useful enough product. There are many more people working on tracing righ
45.
▲
by
parttimenerd
4y ago
(Author here) It's not about Java's ability to do reflection, many languages expose the ability to get stack-traces. It's usually used for logging and exceptions. But I could certainly write a blog post on how stack-walking i
46.
▲
by
parttimenerd
7y ago
Benchmarking is hard and the best combination of configuration settings for one benchmark, measurement one property (e.g. run-time or branch-misses) might not be useful for another benchmark. If we look for example on disabling turbo-boost
47.
▲
by
parttimenerd
7y ago
(I'm the author of temci) After you installed temci, you can just open a shell via `temci short shell --sudo` and get a shell in an environment that implements the guidelines mentioned in the article.