Live data from Hacker News

Context switch logging with the Windows Event Tracing API (2014)

mollyrocket.com

1–10 of 78 posts

Re: Context switch logging with the Windows Event Tracing API (2014)

#4
post #3

Off-topic, but take a look at the source on the site: all absolutely-positioned divs. Previously: https://news.ycombinator.com/item?id=8895662

This site worked great on my android phone. Much better than most responsive sites I've visited. Add to that it loaded quickly. I'd say it's a good design.

Re: Context switch logging with the Windows Event Tracing API (2014)

#6
This API is for people (both program authors and users) who really know quite well what they're doing, for very rare occasions, and the alternative/status quo was to not be able to get this info from the kernel at all. I imagine someone at MS thought they did a favor to people doing performance optimization by giving them something instead of nothing, perhaps they even had to fight to include this feature in the product because obviously Windows would sell rather well without the feature. They must have had a bad day reading this criticism.

(I'm not saying "poor Microsoft" - it's definitely not poor - and I'm not saying "you should thank people for whatever API they give you" - a lot of programs/features do more harm than good - and I'm not saying someone shouldn't vent having had a lot of time burnt by some ugly API. I'm saying specifically that this here is a dark corner of the OS that the API in question sheds at least some light on and I have a hunch, perhaps an entirely mistaken one, that it was someone's pet initiative and they thought it was definitely better than nothing. "Little did they know." To take a simple example of the other kind of API: sprintf, the version that doesn't take a buffer size, is a really bad API because that's something everyone's gonna use a lot and you just shouldn't give this kind of thing to people (give them snprintf at the very least) and you certainly can't be excused by "one should know what they're doing" in this case because it's between hard and uneconomical to use safely while passing the buffer size is the obvious thing to do, also one seems entitled to care-free string formatting, definitely 100x more so than care-free kernel status monitoring on the grounds of it being something many more people do much more often.)

Re: Context switch logging with the Windows Event Tracing API (2014)

#7
post #4
post #3

Off-topic, but take a look at the source on the site: all absolutely-positioned divs. Previously: https://news.ycombinator.com/item?id=8895662

This site worked great on my android phone. Much better than most responsive sites I've visited. Add to that it loaded quickly. I'd say it's a good design.

Not really. I immediately noticed the layout breaks if you use your own font size. Not a good design at all.

Re: Context switch logging with the Windows Event Tracing API (2014)

#9
Yep, it's a difficult API, which has unfortunately meant the functionality, which works amazingly well, hasn't been learnt or adopted as much as it should have been.

However reading this, it seems the author simply wanted to collect trace information. It's probably a documentation issue, but typically you would just use tools like xperf or logman to collect and analyze traces based on in built Windows providers. There's no need in this use case to utilise the API directly at all.

Re: Context switch logging with the Windows Event Tracing API (2014)

#10

Yep, it's a difficult API, which has unfortunately meant the functionality, which works amazingly well, hasn't been learnt or adopted as much as it should have been. However reading this, it seems the author simply wanted to collect trace information. It's probably a documentation issue, but typically you would just use tools like xperf or logman to collect and analyze traces based on in built Windows providers. Ther…

> You can use tools like PerfMon to view logged information about your game, like how much working set it was using or how much disk I/O it did. But there is one specific thing that directly accessing Event Tracing gives you that you can’t get anywhere else: context switch timing.
Post reply on HN