Live data from Hacker News

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

mollyrocket.com

41–50 of 78 posts

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

#41
post #23
post #16

Well, I don't know about the API, but that's certainly the worst blog software ever made, requiring me to enable JavaScript and execute code in order to read some simple HTML and CSS. Why‽

People still disable JS in 2016? I take it that 80%+ of the web is horribly broken for you guys.

the web is often better without javascript. I keep a hotkey ready to enable/disable it, best hotkey in my browser.

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

#43

ETW isn't supposed to be written like this at all. MS has entire codegen toolchain that lets you define events in an xml manifest as part of your build process. This codegens a C header file which lets you fire events in your own code with a simple function call. When you want to correlate events from your own code and OS events you use a tool like XPerf which knows the OS events and can read your application manifes…

> lets you define events in an xml manifest as part of your build process

... at which point you should run screaming.

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

#45

ETW isn't supposed to be written like this at all. MS has entire codegen toolchain that lets you define events in an xml manifest as part of your build process. This codegens a C header file which lets you fire events in your own code with a simple function call. When you want to correlate events from your own code and OS events you use a tool like XPerf which knows the OS events and can read your application manifes…

>But then is the API really bad?

Yes.

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

#46
post #34

I think most of the author's comments apply to the Win32 API in general. Windows game developers are probably among the few tech demographics that still have to encounter it on a regular basis. Having written an entire game to the Win16 API and then later ported it to Win32 I lost a significant chunk of my life spent in drilling into GDI and DirectDraw (I think that is what it was called then) structures and entrypoi…

Win32 API is the most horrendous collection of badly named, nonsensical types and functions I've ever encountered in my career. Back in the mid 90s I was learning how to program and understanding a Win32 "Hello world" was a royal pain compared to everything else I was doing. Functions with more than 8 parameters were the norm, structs with tens of members had to be manually initialised before calling them. And don't…

Easy to call it idiotic today, after twenty years of evolution, but it's a little silly to do so. The windows API was written in C, and as such they needed some way to accommodate multiple dispatch in the message loop using statically typed parameters. That same entry point handled literally hundreds of different message types for every operation in the system. From my perspective it was pretty well designed for its time.

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

#47
I thought this might be about the (old) Java Date API (which also inspired the JavaScript API as well):

https://stackoverflow.com/questions/1969442/whats-wrong-with...

As it is, it's a JavaScript laden blog about a Microsoft Win32 API and is virtually unreadable, so there's not much point in following the OP link.

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

#48

ETW isn't supposed to be written like this at all. MS has entire codegen toolchain that lets you define events in an xml manifest as part of your build process. This codegens a C header file which lets you fire events in your own code with a simple function call. When you want to correlate events from your own code and OS events you use a tool like XPerf which knows the OS events and can read your application manifes…

This seems to be Microsoft's pattern. Make the APIs super low level and difficult to use, and build tooling on top to make it palatable. If you're doing simple stuff with Visual Studio, no problem, but as soon as you need to go deeper, good luck.

I think it's probably embedded in MS developer culture, leftover from the old days when the ulterior motive was to make Windows "easy to develop for, difficult to port away from".

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

#49
post #25
post #23

Earlier quoted context omitted.

People still disable JS in 2016? I take it that 80%+ of the web is horribly broken for you guys.

> People still disable JS in 2016? I take it that 80%+ of the web is horribly broken for you guys. Yeah, it is — but it's better to have to enable JavaScript on a one-by-one basis when desired that to travel across the Internet executing random code and impairing one's privacy. Some websites require JavaScript to display images nowadays. What's wrong with ? Others require JavaScript to use the correct font. What's wr…

> Some websites require JavaScript to display images nowadays. What's wrong with ?

Because trifecta of retina (hi-dpi) displays, responsive design (use the same code for both mobile and desktop) and miserly bandwidth caps, (especially on mobile networks), means that traditional tags won't do it any more.

is designed to help with this - and I'm pleasantly surprised to find that it has landed in a surprising number of browsers http://caniuse.com/#feat= picture - but you'll still need a polyfill, which is if course JavaScript.

Pages with a lot of images also use lazy loading to reduce bandwidth usage even further.

Of course a should be included, but it's getting harder and harder to make the claim that it is economical to support people without JS.

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

#50
post #16

Well, I don't know about the API, but that's certainly the worst blog software ever made, requiring me to enable JavaScript and execute code in order to read some simple HTML and CSS. Why‽

Perhaps consider that coming on here and being condescending about the impact your own browsing habits have on the web experience of your (very small, but very vocal) JavaScript-disabling demographic makes the rest of us web developers really not very interested in building sites that meet your demands. I agree that the site shouldn't need JavaScript to function, but I don't think comments like these help the goal of…

Not condescending, just critical.
Post reply on HN