Skip to content

Commit 6141295

Browse files
Merge branch 'topic/#492' into 'master'
Add support to display memory usage with Alire See merge request eng/ide/gnatstudio!884
2 parents a0e5f2a + 39564e5 commit 6141295

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

share/plug-ins/memory_usage_providers/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, *args, **kwargs):
2929

3030
def is_enabled(self):
3131
"""
32-
Return True if the gievn memory usage provider is currently enabled,
32+
Return True if the given memory usage provider is currently enabled,
3333
False otherwise.
3434
"""
3535

share/plug-ins/memory_usage_providers/ld.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def async_fetch_memory_usage_data(self, visitor):
109109
# been invoked (e.g: when building a library). Return imediately in
110110
# that case.
111111
if not os.path.isfile(map_file_name):
112-
GPS.Logger("MEMORY_USAGE_VIEWS.LD").log("map file not found. Skipping.")
112+
GPS.Logger("MEMORY_USAGE_VIEWS.LD").log(
113+
f"map file not found at '{map_file_name}'. Skipping."
114+
)
113115
visitor.on_memory_usage_data_fetched([], [], [])
114116
return
115117

share/support/core/alire.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
<arg>%X</arg>
5252
</command-line>
5353
<iconname>gps-build-all-symbolic</iconname>
54-
<switches command="%(tool_name)s" columns="1" lines="1" sections="--">
54+
<switches command="%(tool_name)s" columns="1" lines="2" sections="-- -largs">
5555
<title column="1" line="1" >Profiles</title>
56-
<radio
56+
<title column="1" line="2" >Misc</title>
57+
<radio
5758
line="1"
5859
label="Build Profiles"
5960
tip="A build profile can be selected with the appropriate switch.
@@ -65,7 +66,12 @@
6566
switch="--release"/>
6667
<radio-entry label="Validation"
6768
switch="--validation"/>
68-
</radio>
69+
</radio>
70+
<check label="Display memory usage" switch="-Wl,-Map=map.txt"
71+
section="-largs"
72+
tip="Display the memory usage in the Memory usage view"
73+
filter="ld_supports_map_file"
74+
line="2"/>
6975
</switches>
7076
<output-parsers>
7177
output_chopper
@@ -181,7 +187,7 @@
181187
<in-toolbar>FALSE</in-toolbar>
182188
<in-menu>FALSE</in-menu>
183189
<iconname>gps-build-all-symbolic</iconname>
184-
<launch-mode>MANUALLY</launch-mode>
190+
<launch-mode>MANUALLY_WITH_DIALOG</launch-mode>
185191
<read-only>TRUE</read-only>
186192
<command-line>
187193
<arg>alr</arg>
@@ -200,7 +206,7 @@
200206
<in-toolbar>FALSE</in-toolbar>
201207
<in-menu>FALSE</in-menu>
202208
<iconname>gps-build-main-symbolic</iconname>
203-
<launch-mode>MANUALLY</launch-mode>
209+
<launch-mode>MANUALLY_WITH_NO_DIALOG</launch-mode>
204210
<read-only>TRUE</read-only>
205211
<target-type>main</target-type>
206212
<command-line>

0 commit comments

Comments
 (0)