Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gergő Érdi
hpc
Commits
c64f5375
Commit
c64f5375
authored
15 years ago
by
tora@zonetora.co.uk
Browse files
Options
Downloads
Patches
Plain Diff
Use a fixed size value when reading from Memory for ModuleInfo's
parent
c755b110
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trace/Hpc/Reflect.hsc
+5
-5
5 additions, 5 deletions
Trace/Hpc/Reflect.hsc
with
5 additions
and
5 deletions
Trace/Hpc/Reflect.hsc
+
5
−
5
View file @
c64f5375
...
...
@@ -40,7 +40,7 @@ modInfo = unsafePerformIO $ do
ptr <- hs_hpc_rootModule
moduleInfoList ptr
data ModuleInfo = ModuleInfo String
Int
Hash (Ptr Word64)
data ModuleInfo = ModuleInfo String
Word32
Hash (Ptr Word64)
moduleInfoList :: Ptr () -> IO [ModuleInfo]
moduleInfoList ptr
...
...
@@ -57,7 +57,7 @@ moduleInfoList ptr
clearTix :: IO ()
clearTix = do
sequence_ [ pokeArray ptr $ take count $ repeat 0
sequence_ [ pokeArray ptr $ take
(fromIntegral
count
)
$ repeat 0
| ModuleInfo _mod count _hash ptr <- modInfo
]
return ()
...
...
@@ -65,8 +65,8 @@ clearTix = do
examineTix :: IO Tix
examineTix = do
mods <- sequence [ do tixs <- peekArray count ptr
return $ TixModule mod' hash count
mods <- sequence [ do tixs <- peekArray
(fromIntegral
count
)
ptr
return $ TixModule mod' hash
(fromIntegral
count
)
$ map fromIntegral tixs
| (ModuleInfo mod' count hash ptr) <- modInfo
]
...
...
@@ -82,7 +82,7 @@ updateTix (Tix modTixes)
| (ModuleInfo mod1 count1 hash1 ptr,
TixModule mod2 hash2 count2 tixs) <- zip modInfo modTixes
, if mod1 /= mod2
|| count1 /= count2
||
(fromIntegral
count1
)
/= count2
|| hash1 /= hash2
|| length tixs /= count2
then error "updateTix failed"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment