20 ms·
DTrace on Windows
- AndrewDavis 8y agoI'm curious if this will be available on the Linux subsystem for windows? Anyone have an insider build to test?
- bch 8y agoAs a BSD user w partial dtrace support[0], very interested to see what impact this has in the instrumentation world, considering Linux has gone w eBPF[1] for their workalike implementation. [0] https://wiki.netbsd.org/tutorials/how_to_enable_and_run_dtrace/ https://wiki.netbsd.org/tutorials/how_to_enable_and_run_dtra... [1] https://en.m.wikipedia.org/wiki/Berkeley_Packet_Filter https://en.m.wikipedia.org/wiki/Berkeley_Packet_Filter
- webaholic 8y ago"DTrace has a C-style high level and powerful programming language that allows you to dynamically insert trace points." Yes, that would be the D programming language :)
- adamnemecek 8y agoI think it was worded correctly considering there are two languages called D.
- haripatmsft 8y agoyes, that's actually exactly why I wrote it that way.
- lallysingh 8y agoAnd it's really more awk-ish than C-ish.
- vkaku 8y agoSweet! Next stop, Microsoft should get officially have ZFS running on Windows (There is a port of it already) There is some sort of a bitterness in the Linux community when people talk about ZFS or DTrace. But it's the consumer who is affected by it. For their sake, I hope they don't take the 'We have BtrFS/eBPF/X' path.
- qalmakka 8y agoThis. They really need a newer, more modern filesystem, especially since Apple has done away with HFS+ and has introduced APFS. ReFS is really dead in the water, and ZFS would give them a powerful, battle-tested filesystem which they could use as a real selling point for Windows Server. Also things such as Windows updates and system restore would benefit a lot from ZFS's native snapshotting capabilities. Merging DTrace implicitly means they are fine with both the CDDL and Oracle's patents, and thus that ZFS wouldn't be an issue for them.
- vbernat 8y agoDTrace has switched to GPL for the kernel part (see https://oss.oracle.com/projects/DTrace/ https://oss.oracle.com/projects/DTrace/).
- lallysingh 8y agoFrom that page, it looks like dtrace is GPL for the entire linux port.
- ezannoni 8y agoHi, Yes, it's GPL (and we got rid of the separate kernel module). The utils portion is UPL. It's available with new kernels (including 5.0) on github as well. https://github.com/oracle/dtrace-utils https://github.com/oracle/dtrace-utils https://github.com/oracle/libdtrace-ctf https://github.com/oracle/libdtrace-ctf https://github.com/ezannoni/dtrace-linux-kernel https://github.com/ezannoni/dtrace-linux-kernel We are working on a Fedora version of the kernel patches. We are also discussing with the BPF team (on netdev) how to provide DTrace functionality integrated with the Linux Kernel.
- lelf 8y agoKudos for Microsoft for not going the Linux NIH way.
- josteink 8y agoNIH would imply they had a real choice. Sadly due to licensing, they don’t. Edit: I stand corrected. GPL should be fine.
- lelf 8y agoIt's pure NIH. dtrace is GPLv2. (Also ZFS (CDDL) run fine on Linux.)
- josteink 8y agoThanks for the correction. I thought/assumed dtrace was CDDL too. I know ZFS works fine on Linux, because I use it everywhere, but there’s no way around the fact that the incompatible licenses are causing issues.
- johannkokos 8y agoYou're not wrong. Dtrace is gpl only in 2017.
- kapilvt 8y agodtrace is now gplv2 (2018, ~10 years after the acquisition), it wasn't for a long time (and its still a separate license around userspace), because oracle was holding it as a competitive advantage I presume for unbreakable linux distro (they ported dtrace over to unbreakable linux ~2012), the rest of the linux community continued with other projects (system tap, ktap, lttng, ftrace, etc), before settling in over the last 24 months onto building onto of bpf (see https://github.com/iovisor/bpftrace https://github.com/iovisor/bpftrace for a high level dsl interface), at which point oracle GPL'd dtrace, ie when it held no value, because everyone had moved on.
- 8y ago
- Aissen 8y agoThat is one big commit: https://github.com/opendtrace/opendtrace/commit/893932783d5ae969c8f851f17161e06695e711be https://github.com/opendtrace/opendtrace/commit/893932783d5a... It seems to be on a project which has virtually no contributions since last august. In addition, I'm not sure where Microsoft is going with this: your DTrace scripts probably won't be portable anyway. The only common point is the language. Is that sufficient ?
- jen20 8y agoDepending on what and where you are tracing, scripts likely already are not compatible between different operating systems which support Dtrace - FreeBSD, Solaris and Illumos, and MacOS all have different system calls (for example). That said, there are _many_ points of commonality which will apply to Windows too - USDT probes, function boundary tracing etc.
- bibyte 8y agoI wonder why they didn't split the commit.
- yjftsjthsd-h 8y agoDo they need to be portable/compatible? If MS wrote their own version/alternative, then it'd be incompatible with everything. This way they get a load of high-quality code for free, and even if it's not directly compatible with existing uses at least the general framework is known by existing users and there's existing documentation so they don't have to do the whole thing from scratch and train all the users themselves. API compatibility would help, but there's value without it.
- santoshalper 8y agoOnly time will tell, but it can't hurt to be language compatible. All the unix engineers out there who depend on dtrace will find it more comfortable to use. On the other hand, using a foreign syntax can hurt too, had they used something that looked more like powershell for example, it might have been easier for Windows admins to get accustomed to.
- AJRF 8y agoDo you feel it? The tectonic plates of developer sentiment slowly shifting below your feet. It won't all come in a wave. It is the gradual investment in tools like this that over time amount to a viable alternative to the MacBook Pro running macOS. WSL, Open source .NET, Investing in making Edge work like Chrome (more important to developers and consumers than your ideological quandries with Google owning the web will ever be). The last few years have been great for MS
- DoofusOfDeath 8y agoI get the impression that there's a lot of disagreement amongst developers regarding Microsoft's true intentions. I see three main clusters at the moment: (1) Those who consider Microsoft to be reasonably trustworthy based on recent behavior. (2) Those who will need Microsoft to continue its current behavior for a longer period before they're ready to trust. (3) Those who consider Microsoft's current behavior to be at best a partial improvement over the past, or at worst a charm-offensive meant to distract from their ongoing bad behavior. E.g., Windows 10 with unavoidable snooping, and ongoing stealth patent attacks on Linux.
- anth_anm 8y agoThe second group doesn't exist, it's just people in the 3rd group lying (to themselves even).
- hyperman1 8y agoI presume cluster 1 and 3 also exist inside microsoft. A company of this size is always going to be a bit schyzophrenic. Let's hope the good guys win this one, but I personally don't see it happening unless they get hit with governemental regulation on a regular base.
- xorcist 8y ago(4) Astroturfing. Seriously. Everyone else is doing it, why shouldn't they?
- 8y ago
- Iwillgetby 8y agoCan any microsoft folks discuss similarities/differences between dtrace and procmon? Besides the obvious gui vs commandline difference of course. Is the performance on par with running dtrace on solaris?
- Birch-san 8y agothe scope of DTrace far exceeds that of procmon. procmon will show you params and return code for file accesses, and provides filtering, but that's the limit. whereas DTrace could tell you "these are the file accesses that took longer than 5ms" or "here's a histogram/heatmap of file access durations". DTrace can correlate — file accesses by a given process in-between a given function's entry and exit — telling you _why_ a file was accessed. well, maybe you're just asking how performant DTrace would be at achieving the same output. sadly I can't answer that.
- polskibus 8y agoI wonder if they backport dtrace so it can be used on older Windows Servers (2012 for instance)? Or maybe they can somehow make it work in .NET Core only for such operating systems - it could still be very useful.
- lelf 8y agoUnlikely. Dtrace needs support from many OS components, including kernel.
- santoshalper 8y agoNot too likely. The hard part of implementing dtrace isn't porting over the program itself, it is the huge number of OS kernel hooks required to instrument. Those are unlikely to be back-ported. The really interesting question is now that they have the hooks, will they consider making additional interfaces with their own languages (powershell anyone?)
- Iwillgetby 8y agoGood dtrace stuff here that shows the power of dtrace on Solaris, MacOS, and FreeBSD. http://www.brendangregg.com/dtrace.html http://www.brendangregg.com/dtrace.html
- brendangregg 8y agoCongrats to Microsoft, I look forward to running my old DTrace scripts on Windows! This also means they have done a lot of the platform work needed to support eBPF one day, to really catch up to Linux.
- Iwillgetby 8y agoDtrace is amazingly powerful. Thanks for all your contributions over the years. http://www.brendangregg.com/dtrace.html http://www.brendangregg.com/dtrace.html
- cryptonector 8y agoWould you say eBPF is better than DTrace now?
- chupasaurus 8y agoTo run native containers, they've implemented almost all Linux kernel namespaces (IIRC mount was almost there already) and resource limiter. So, if there are some profits on the horizon, that may become a reality.
- tambourine_man 8y agoI love this new dev friendly Microsoft. Makes me more enticed to switch everyday.
- tracker1 8y agoI'm happy to see the changes, and more than happy to consider Azure and even like Azure Devops... I'm still a bit more comfortable on a Mac or Linux environment. There are some odd windows-isms for bash on windows, or the LSW, or Docker Desktop, etc. I'm hoping a lot of it gets more solid in the next couple years. As it stands, I'm happier to see .Net Core running outside windows more.
- GuB-42 8y agoMicrosoft has always been dev friendly. What's new is that they now acknowledge the existence of the UNIX world and open source.
- j16sdiz 8y agoNot "always". It is not long ago when Visual Studio get community edition.
- bsder 8y agoTranslation: Microsoft needs DTrace to debug and control Azure.
- santoshalper 8y agoI'm sure scratching their own itch was a significant part of this. DTrace is fantastic, and Microsoft is one of the largest server operators in the world so the need is clearly there.
- cryptonector 8y agoAnyone operating a cloud of remotely interesting size will need DTrace, or, if they use Linux, eBPF tracing. It was a foregone conclusion that Microsoft needed DTrace. Microsoft surely also needed it for other reasons. Developers, sysadmins, and power users -- all need DTrace or DTrace-like tools. We're finally leaving the dark ages of unobservable operating systems! Hooray! We should all give huge thanks to the creators of DTrace, Mike Shapiro, Bryan Cantrill, and Adam Leventhal, as well as Brendan Gregg and all of the crew at http://dtrace.org http://dtrace.org.
- renholder 8y ago>Only available on x64 Windows and captures tracing info only for 64-bit processes Does that include Wow64[0]? [0] - https://docs.microsoft.com/en-us/windows/desktop/WinProg64/wow64-implementation-details https://docs.microsoft.com/en-us/windows/desktop/WinProg64/w...
- josteink 8y agoAs far as I know wow64 exists to run 32-bit processes on 64-bit Windows, so given their statement I would assume no.
- renholder 8y agoWOW64 is a 64-bit "wrapper" for 32-bit processes. You can see this when you debug a WOW64 process in WinDbg[0]; so, the system is agnostic about it's "bitness" because it "appears" to be an x64 process but it's really 32-bit, just wrapped. Thus, the posit. :) [0] - https://docs.microsoft.com/en-us/windows/desktop/WinProg64/debugging-wow64 https://docs.microsoft.com/en-us/windows/desktop/WinProg64/d...
- ksec 8y agoAt this rate I would not be surprised if Microsoft Open Source part of the Windows Kernel in future.
- cryptonector 8y agoAll those applications that added USDT providers... that work will pay off even more now!
- global120 8y ago<a href="https://theglobalexposure.com/best-study-abroad-consultants-in-delhi/">Best https://theglobalexposure.com/best-study-abroad-consultants-... Study Abroad Consultants in Delhi</a> <a href="https://theglobalexposure.com/top-10-overseas-education-consultants-in-delhi/">Top https://theglobalexposure.com/top-10-overseas-education-cons... 10 Overseas Education Consultants in Delh</a> <a href="https://theglobalexposure.com/canada-education-consultants-in-delhi/">Best https://theglobalexposure.com/canada-education-consultants-i... Canada Education Consultants in Delhi</a> <a href="https://theglobalexposure.com/top-immigration-consultants-in-delhi-for-canada/">Top https://theglobalexposure.com/top-immigration-consultants-in... Immigration Consultants in Delhi for Canada</a>