summaryrefslogtreecommitdiff
path: root/DevTools
AgeCommit message (Collapse)Author
2020-02-02LibCore: Put all classes in the Core namespace and remove the leading CAndreas Kling
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
2020-02-02LibGUI: Add GHBoxLayout and GVBoxLayout convenience classesAndreas Kling
2020-01-27LibGUI: Add 64-bit signed integer support to GVariantAndreas Kling
What was previously the "Int" type is now "Int32" and "Int64".
2020-01-23GTextEditor: Move "Go to line" feature from HackStudio into GTextEditorAndreas Kling
This is a handy feature for any multi-line GTextEditor, so let's just have it in the base widget. :^) Fixes #1122.
2020-01-19Kernel: Let's say that everything < 3GB is user virtual memoryAndreas Kling
Technically the bottom 2MB is still identity-mapped for the kernel and not made available to userspace at all, but for simplicity's sake we can just ignore that and make "address < 0xc0000000" the canonical check for user/kernel.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-17Kernel: Add "accept" pledge promise for accepting incoming connectionsAndreas Kling
This patch adds a new "accept" promise that allows you to call accept() on an already listening socket. This lets programs set up a socket for for listening and then dropping "inet" and/or "unix" so that only incoming (and existing) connections are allowed from that point on. No new outgoing connections or listening server sockets can be created. In addition to accept() it also allows getsockopt() with SOL_SOCKET and SO_PEERCRED, which is used to find the PID/UID/GID of the socket peer. This is used by our IPC library when creating shared buffers that should only be accessible to a specific peer process. This allows us to drop "unix" in WindowServer and LookupServer. :^) It also makes the debugging/introspection RPC sockets in CEventLoop based programs work again.
2020-01-16HackStudio: add exec pledgejoshua stein
2020-01-16HackStudio: set sane $PATH early to include /usr/local/binjoshua stein
Launching from the terminal inherits $PATH which includes /usr/local/bin, but launching from the system menubar doesn't, so HackStudio wasn't finding make installed from ports.
2020-01-12Applications+DevTools+MenuApplets: Drop "unix" pledge when possibleAndreas Kling
Now that the "unix" pledge is no longer required for socket I/O, we can drop it after making the connections we need in a program. In most GUI program cases, once we've connected to the WindowServer by instantiating a GApplication, we no longer need "unix" :^)
2020-01-11HackStudio: Use pledge()Andreas Kling
2020-01-07Themes: Support rubberband selection theming0xtechnobabble
2020-01-02Build: HOST_CXX -> USE_HOST_CXXjoshua stein
Allow HOST_CXX to be passed to make which will be the actual host C++ compiler used, such as 'make HOST_CXX=clang++'.
2020-01-02ProfileViewer: Interpret addresses >= 0xc0000000 as kernel framesAndreas Kling
2019-12-30LibIPC: Let's start building custom message codecs for LibIPCAndreas Kling
Instead of using ByteBuffer (which always malloc() their storage) for IPC message encoding, we now use a Vector<u8, 1024>, which means that messages smaller than 1 KB avoid heap allocation entirely.
2019-12-28HackStudio: Check for make command on startupConrad Pankoff
2019-12-28HackStudio: Add file list context menu and file removal actionConrad Pankoff
2019-12-26HackStudio: Fix failure to open filesAndreas Kling
Use FileSystemPath to figure out that "./foo.cpp" == "foo.cpp"
2019-12-25Build: support library and generator dependenciesjoshua stein
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each subdirectory Makefile listing the libraries needed for building/linking such as "LIB_DEPS = Core GUI Draw IPC Core". This adds each library as an -L and -l argument in LDFLAGS, but also adds the library.a file as a link dependency on the current $(PROGRAM). This causes the given library to be (re)built before linking the current $(PROGRAM), but will also re-link any binaries depending on that library when it is modified, when running make from the root directory. Also turn generator tools like IPCCompiler into dependencies on the files they generate, so they are built on-demand when a particular directory needs them. This all allows the root Makefile to just list directories and not care about the order, as all of the dependency tracking will figure it out.
2019-12-24LibGUI+LibDraw: Add "Palette" concept for scoped color themingAndreas Kling
GApplication now has a palette. This palette contains all the system theme colors by default, and is inherited by a new top-level GWidget. New child widgets inherit their parents palette. It is possible to override the GApplication palette, and the palette of any GWidget. The Palette object contains a bunch of colors, each corresponding to a ColorRole. Each role has a convenience getter as well. Each GWidget now has a background_role() and foreground_role(), which are then looked up in their current palette when painting. This means that you no longer alter the background color of a widget by setting it directly, rather you alter either its background role, or the widget's palette.
2019-12-24LibDraw: Add Selection and SelectionText system theme colorsAndreas Kling
2019-12-23WindowServer+LibGUI: Implement basic color themingAndreas Kling
Color themes are loaded from .ini files in /res/themes/ The theme can be switched from the "Themes" section in the system menu. The basic mechanism is that WindowServer broadcasts a SharedBuffer with all of the color values of the current theme. Clients receive this with the response to their initial WindowServer::Greet handshake. When the theme is changed, WindowServer tells everyone by sending out an UpdateSystemTheme message with a new SharedBuffer to use. This does feel somewhat bloated somehow, but I'm sure we can iterate on it over time and improve things. To get one of the theme colors, use the Color(SystemColor) constructor: painter.fill_rect(rect, SystemColor::HoverHighlight); Some things don't work 100% right without a reboot. Specifically, when constructing a GWidget, it will set its own background and foreground colors based on the current SystemColor::Window and SystemColor::Text. The widget is then stuck with these values, and they don't update on system theme change, only on app restart. All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23HackStudio: Show the project name as the root in the project treeAndreas Kling
2019-12-23HackStudio: Sort the project tree alphabeticallyAndreas Kling
I had to turn the tree nodes into RefCounted objects since it's not possible to quick_sort() a Vector<OwnPtr<T>> at the moment.
2019-12-23HackStudio: Show the project file list in a tree viewAndreas Kling
Replace the boring list view with an awesome tree view :^)
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler.
2019-12-17ProfileViewer: Make initial invert checkbox match initial tree viewOhad Rau
The "Invert tree" checkbox was accidentally defaulted to display true when the actual tree wasn't being inverted, causing the checkbox to say the opposite of the tree state initially. This change just brings the visual indicator in line with what the code is actually doing.
2019-12-16ProfileViewer: Ignore empty samplesAndreas Kling
Sometimes we get empty samples in a profile. I'm not sure why that happens, but let's just ignore them for now.
2019-12-16ProfileViewer: Add the ability to invert the profile treeAndreas Kling
Inverting the tree turns all of the innermost stack frames into roots, allowing them to accumulate their total sample counts with other instances of the same frame being innermost. This is an essential feature of any cool profiler, and now we have it. :^)
2019-12-15ProfileViewer: Add a basic menu bar to make it look properAndreas Kling
2019-12-15ProfileViewer: Scale the sample columns by stack depthAndreas Kling
From a nice suggestion by Nagy Tibor. :^)
2019-12-15ProfileViewer: Convert the JSON samples into a more efficient formatAndreas Kling
Only do the conversion from JSON once. This makes it much faster to do time range filtering with the timeline widget. :^)
2019-12-15ProfileViewer: Fix copy-paste error :^)gla3dr
Saw this copy-paste mistake in the ProfileViewer Timeline video
2019-12-14ProfileViewer: Precompute the timestamp and "in kernel?" per sampleAndreas Kling
Instead of fetching these from JSON in every paint event, we now have a separate "SampleData" vector that can be iterated. This optimization was made possible by profiling ProfileViewer and then analyzing the profile with ProfileViewer! :^)
2019-12-14ProfileViewer: Allow filtering samples in a specific time rangeAndreas Kling
You can now select the time range you want on the profile timeline. The tree view will update automatically as you alter the range. Unfortunately this causes the treeview to collapse all of its nodes. It would be nice to solve this somehow in the future so that nodes can stay open.
2019-12-14ProfileViewer: Add a timeline widget for a visual view of the profileAndreas Kling
Userspace stack frames are in blue, kernel stack frames in red :^)
2019-12-14IPCCompiler: Use const references for message constructor parametersAndreas Kling
2019-12-14ProfileViewer: Show kernel frames with a red icon :^)Andreas Kling
2019-12-13ProfileViewer: Use the new multi-column tree model support in GTreeViewAndreas Kling
Put the sample count into a separate column. This is so neat :^)
2019-12-12ProfileViewer: Make sure ProfileNodes have the correct parent pointerAndreas Kling
We were forgetting to call ProfileNode::add_child() which is how the parent node pointer gets set. This fixes the weird looking GTreeView.
2019-12-12ProfileViewer: Begin work on a visualization tool for profiles :^)Andreas Kling
We begin with a simple treeview that shows a recorded profile. To record and view a profile of a process with <PID>, simply do this: $ profile <PID> on ... wait while PID does something interesting ... $ profile <PID> off $ cat /proc/profile > my-profile.prof $ ProfileViewer my-profile.prof
2019-12-10HackStudio: Use a table view in the "find in files" widgetAndreas Kling
Make the results of a "find in files" operation look a lot nicer by presenting them in a table format, instead of in a single-column list. Since we don't yet support rich text in table view cells, use the marker glyphs in the system default fixed-width font to show where the matched text begins and ends on the line we found it on. :^)
2019-12-09LibGUI: Make GMenu inherit from CObjectAndreas Kling
This is primarily to make it possible to pass a GMenu* where a CObject* is expected.
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
2019-12-02LibIPC: Rename IMessage id/name to message_id/message_nameAndreas Kling
Hogging "id" and "name" makes it impossible to use these as message parameter names, which seems silly. :^)
2019-12-02WindowServer: Port to the new IPC systemAndreas Kling
This patch introduces code generation for the WindowServer IPC with its clients. The client/server endpoints are defined by the two .ipc files in Servers/WindowServer/: WindowServer.ipc and WindowClient.ipc It now becomes significantly easier to add features and capabilities to WindowServer since you don't have to know nearly as much about all the intricate paths that IPC messages take between LibGUI and WSWindow. The new system also uses significantly less IPC bandwidth since we're now doing packed serialization instead of passing fixed-sized structs of ~600 bytes for each message. Some repaint coalescing optimizations are lost in this conversion and we'll need to look at how to implement those in the new world. The old CoreIPC::Client::Connection and CoreIPC::Server::Connection classes are removed by this patch and replaced by use of ConnectionNG, which will be renamed eventually. Goodbye, old WindowServer IPC. You served us well :^)
2019-12-02HackStudio: Fixes CppLexer crashing on a comment block that doesSasan Hezarkhani
not end. CppLexer expected that `/*` always has `*/` at the end. This PR fixes the issue and assumes the rest of file is a comment.
2019-11-26Kernel: Expose per-thread information in /proc/allAndreas Kling
Previously it was not possible to see what each thread in a process was up to, or how much CPU it was consuming. This patch fixes that. SystemMonitor and "top" now show threads instead of just processes. "ps" is gonna need some more fixing, but it at least builds for now. Fixes #66.
2019-11-24LibHTML: Use LibProtocol for HTTP requests :^)Andreas Kling
This moves all of the browser networking to ProtocolServer.
2019-11-23IPCCompiler: Add support for String parameters in messagesAndreas Kling