Skip to content

Commit

Permalink
Merge branch 'sapmachine' of https://github.com/SAP/SapMachine into m…
Browse files Browse the repository at this point in the history
…alloc_hook_replacement
  • Loading branch information
schmelter-sap committed Nov 24, 2023
2 parents 74df72b + d856242 commit 5de5deb
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/actions/update-wiki/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update Wiki

description: |
This action updates the wiki with the latest blog posts.
runs:
using: composite
steps:
- name: Update Wiki
run: |
git clone https://github.com/SAP/SapMachine.wiki.git
cd SapMachine.wiki
pip3 install feedparser
python3 scripts/update_blogs.py update > ../out
cat ../out
if grep -q changed ../out; then
git commit -a -m "Update blog posts"
git push
echo "Blog post list updated"
else
echo "No updates"
fi
working-directory: .
shell: bash
18 changes: 18 additions & 0 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Runs update-wiki update actions every day at 20:00 UTC

name: 'Wiki Update'

on:
workflow_dispatch:
schedule:
- cron: '0 20 * * *'

jobs:
wiki:
runs-on: ubuntu-latest
steps:
- name: 'Checkout the JDK source'
uses: actions/checkout@v4
- name: 'Update Wiki'
uses: ./.github/actions/update-wiki

4 changes: 2 additions & 2 deletions src/hotspot/os/linux/vitals_linux_oswrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class ProcFile {
return false;
}

size_t bytes_read = ::fread(_buf, 1, bufsize, f);
_buf[bufsize - 1] = '\0';
size_t bytes_read = ::fread(_buf, 1, bufsize - 1, f);
_buf[bytes_read] = '\0';

::fclose(f);

Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/share/vitals/vitals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ class SampleTables: public CHeapObj<mtInternal> {

bool should_log = (column->extremum() == MAX) && (sample->value(idx) > extremum_sample->value(idx));
should_log |= (column->extremum() == MIN) && (sample->value(idx) < extremum_sample->value(idx));
should_log &= sample->value(idx) != INVALID_VALUE;
should_log |= extremum_sample->value(idx) == INVALID_VALUE;

if (should_log) {
Sample* last_extremum_sample = _last_extremum_samples.sample_at(idx);
Expand Down

0 comments on commit 5de5deb

Please sign in to comment.