This question feels silly, but it really puzzles me. When I look at the source code of gem5, I always come across classes like typedef typename CPUPol::IQ IQ; typedef typename Impl::DynInstPtr DynInstPtr;. I want to see what functions are in these classes. But in vscode, I cannot jump to where they are defined. I can't even search for them. I also didn't find some files having similiar names with the class names.
In gem5, how do I know the specific location of the class?
247 Views Asked by Gerrie At
1
There are 1 best solutions below
Related Questions in VISUAL-STUDIO-CODE
- vscode file icons
- Building C# code in VSCode on Mac
- How do I support jasmine and es6 syntax in Visual studio Code?
- JS Code didn't work, trying do a demo in css lessons
- Debug Java in Brackets editor or Visual Studio Code
- Visual Studio Code, C# support on Windows
- What is the use of the Developer Tools in VS Code?
- Option to push disabled in Visual Studio Code
- How do I include 'System.Runtime.Serialization.Json' namespace in my VSCode project on Mac OS X?
- Using System.Web.Http on mac os x
- VSCode intelliSense autocomplete for javascript
- Set language for syntax highlighting in Visual Studio Code
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Predefined type 'System.Object' is not defined or imported [dnxcore50]
- VS code appending special characters on paste
Related Questions in GEM5
- How can I only see the execution process of the instructions of my C code starting at main in gem5 syscall emulation?
- Which version of protoc should I need?
- How can I know what are the optional choices for the gem5 command line options such as --cpu-type?
- is there a solution to solve "Someone allocated physical memory at VA 0x400000...0 without creating a VMA"?
- Can I debug gem5 in vs code?
- Control memory bandwidth in Gem5
- Gem5 full system emulation (x86) - booting linux is very slow
- Is there an alternative to cflush in gem5?
- The execution process of the instruction and the realization in gem5?
- In gem5, how do I know the specific location of the class?
- How to display the microop in the reorder buffer for gem5?
- How to use both python 2.7 and 3 in gem5?
- runing diffrent programs in multiocore architecture in gem5
- How should I define the size of L3 cache in Gem5?
- query related to BigDataBench benchmark and simplescalar tool and gem5 simulator
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
gem5 uses in some points this horrible impl template pattern instead of virtual methods. Someone explained it to me why but I forgot.
Then IDEs such as Eclipse which I've tested with are not able to resolve "a list of templates used", here's a minimal test for that.
In the specific case of
typedef typename Impl::DynInstPtr DynInstPtrI managed to find the definition as follows in Eclipse. This would likely also work on vscode.Start from one of the typedefs e.g.:
Search for usages of
BaseDynInst(Ctrl + Alt + G). The first usage luckily is:which is an explicit template instantiation.
So now I just jump to the definition of
O3CPUImpland there it is:So yes, in this case I got lucky. If there was no explicit instantiation done, I would have had to search for all usages of the constructor that built the object to find what type was being set on the template.
Also, with the hindsight of the result, we could have noticed earlier that when searching for the definition of
DynInstPtr(Ctrl + Shift + T), any results in a class named*Implwould be the interesting ones, due to the gem5 naming pattern used.Finally, another guerrilla technique you could use you be to just:
which points us to
O3CPUImplwith several entries of type:Some of this had been briefly mentioned here.
Tested on gem5 0d5a80cb469f515b95e03f23ddaf70c9fd2ecbf2.